about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-10-23 01:31:19 +0100
committerJames Booth <boothj5@gmail.com>2012-10-23 01:31:19 +0100
commit07f41e646fddef61b5e53cbd7fc504d96cbbda1a (patch)
tree93f126d95d499c21e4452d74a4be061b7cdad08b /src
parentabec6ae07c765c6bbb8ac84199a6cc3dbd3f3cb3 (diff)
downloadprofani-tty-07f41e646fddef61b5e53cbd7fc504d96cbbda1a.tar.gz
Check for method of setting ESCDELAY
Diffstat (limited to 'src')
-rw-r--r--src/input_win.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/input_win.c b/src/input_win.c
index 408bd45a..9ee71ce1 100644
--- a/src/input_win.c
+++ b/src/input_win.c
@@ -72,8 +72,11 @@ static void _parameter_autocomplete(char *input, int *size, char *command,
 void
 create_input_window(void)
 {
-    if (getenv("ESCDELAY") == NULL)
-        ESCDELAY = 25;
+#ifdef NCURSES_REENTRANT
+    set_escdelay(25);
+#else
+    ESCDELAY = 25;
+#endif
 
     int rows, cols;
     getmaxyx(stdscr, rows, cols);