diff --git a/src/input_win.c b/src/input_win.c index 107d6985..408bd45a 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -72,6 +72,9 @@ static void _parameter_autocomplete(char *input, int *size, char *command, void create_input_window(void) { + if (getenv("ESCDELAY") == NULL) + ESCDELAY = 25; + int rows, cols; getmaxyx(stdscr, rows, cols); @@ -220,6 +223,11 @@ _handle_edit(const int ch, char *input, int *size) switch(ch) { + case 27: // ESC + *size = 0; + inp_clear(); + return 1; + case 127: case KEY_BACKSPACE: contact_list_reset_search_attempts();