error handling when editing file permissions

Still highly non-ideal. Lua is a dynamic language, and has low ability
to detect syntax errors within functions.

Perhaps I should run a test call after every edit.
This commit is contained in:
Kartik K. Agaram 2022-01-02 22:51:27 -08:00
parent e3cef7ee56
commit be0c936276
1 changed files with 21 additions and 1 deletions

View File

@ -1331,7 +1331,27 @@ void resumeNonCodeEdit() {
E.cols = COLS-LINE_NUMBER_SPACE;
E.startrow = CALLERS_SPACE;
E.endrow = LINES-MENU_SPACE;
editorRefreshScreen(editorMenu);
editorRefreshScreen(editorNonCodeMenu);
int c = getch();
editorProcessKeypress2(c);
}
}
void resumeNonCodeEdit2() {
Quit = 0;
Back_to_big_picture = 0;
E.startcol = LINE_NUMBER_SPACE;
E.startrow = 1; /* space for function header */
E.endrow = 10; /* nudge people to keep function short */
while(!Quit) {
/* update on resize */
E.cols = COLS-LINE_NUMBER_SPACE;
editorRefreshScreen(editorNonCodeMenu);
int y, x;
getyx(stdscr, y, x);
mvaddstr(0, 0, "function file_operation_permitted(filename, mode)");
mvaddstr(E.startrow + E.numrows - E.rowoff, 0, "end");
mvaddstr(y, x, "");
int c = getch();
editorProcessKeypress2(c);
}