diff options
-rw-r--r-- | src/kilo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kilo.c b/src/kilo.c index 25660d2..0cec5cb 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -780,15 +780,15 @@ static void editorFind() { while(1) { editorSetStatusMessage( - "Search: %s (Use ^g/Arrows/Enter)", query); + "Search: %s (Use Esc/Arrows/Enter)", query); editorRefreshScreen(); int c = getch(); if (c == KEY_BACKSPACE) { if (qlen != 0) query[--qlen] = '\0'; last_match = -1; - } else if (c == CTRL_G || c == ENTER) { - if (c == CTRL_G) { + } else if (c == ESC || c == ENTER) { + if (c == ESC) { E.cx = saved_cx; E.cy = saved_cy; E.coloff = saved_coloff; E.rowoff = saved_rowoff; } @@ -971,13 +971,13 @@ static void editorGo(lua_State* L) { qlen = strlen(query); while(1) { - editorSetStatusMessage("Jump to (^g to cancel): %s", query); + editorSetStatusMessage("Jump to (Esc to cancel): %s", query); editorRefreshScreen(); int c = getch(); if (c == KEY_BACKSPACE) { if (qlen != 0) query[--qlen] = '\0'; - } else if (c == CTRL_G || c == ENTER) { + } else if (c == ESC || c == ENTER) { editorSetStatusMessage(""); if (c == ENTER) { save_to_current_definition_and_editor_buffer(L, query); |