about summary refs log tree commit diff stats
path: root/src/input_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_win.c')
-rw-r--r--src/input_win.c8
1 files changed, 8 insertions, 0 deletions
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();