feels more consistent to exit editor with ctrl-x

This commit is contained in:
Kartik K. Agaram 2022-01-04 21:52:23 -08:00
parent 08c1ea8fc4
commit 4798d97a15

View File

@ -665,7 +665,7 @@ static void editorMenu(void) {
mvaddch(LINES-1, x, ' '); mvaddch(LINES-1, x, ' ');
attrset(A_NORMAL); attrset(A_NORMAL);
menu_column = 2; menu_column = 2;
draw_menu_item("^e", "run"); draw_menu_item("^x", "run");
if (Previous_error != NULL) { if (Previous_error != NULL) {
attron(A_BOLD); attron(A_BOLD);
draw_menu_item("^c", "abort"); draw_menu_item("^c", "abort");
@ -1090,7 +1090,7 @@ static void editorProcessKeypress2(int c) {
if (Previous_error != NULL) if (Previous_error != NULL)
exit(1); exit(1);
break; break;
case CTRL_E: case CTRL_X:
/* Save and quit. */ /* Save and quit. */
editorSaveToDisk(); editorSaveToDisk();
save_editor_state(E.rowoff, E.coloff, E.cy, E.cx); save_editor_state(E.rowoff, E.coloff, E.cy, E.cx);
@ -1226,7 +1226,7 @@ static void editorNonCodeMenu(void) {
mvaddch(LINES-1, x, ' '); mvaddch(LINES-1, x, ' ');
attrset(A_NORMAL); attrset(A_NORMAL);
menu_column = 2; menu_column = 2;
draw_menu_item("^e", "back"); draw_menu_item("^x", "back");
if (Previous_error != NULL) { if (Previous_error != NULL) {
attron(A_BOLD); attron(A_BOLD);
draw_menu_item("^c", "abort"); draw_menu_item("^c", "abort");