From bec62b69f1cd15a2abe4f03416fd30727d1b64bc Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 21 Dec 2002 02:09:00 +0000 Subject: [PATCH] * layout.c (init_curses) [!HAVE_SLANG]: Set ESCDELAY to 200ms. If ESCDELAY is 0, ncurses 5.2 may stop recognizing escape sequences under heavy CPU load. --- src/ChangeLog | 6 ++++++ src/TODO | 3 --- src/layout.c | 11 ++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bca0c41c4..37a8074df 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-12-20 Pavel Roskin + + * layout.c (init_curses) [!HAVE_SLANG]: Set ESCDELAY to 200ms. + If ESCDELAY is 0, ncurses 5.2 may stop recognizing escape + sequences under heavy CPU load. + 2002-12-19 Pavel Roskin * screen.c (chdir_other_panel): Use do_panel_cd() on the diff --git a/src/TODO b/src/TODO index 44cce0b9a..3eb9ce353 100644 --- a/src/TODO +++ b/src/TODO @@ -1,9 +1,6 @@ Before 4.6.0-pre2 ================= -ncurses 5.2 turns off keypad under heavy load on xterm. Check if -anything can be done about it. - ftp and fish with home != '/' - readjust directory to the home. Allow modifiers for keys in mc.lib, like "shift-up". diff --git a/src/layout.c b/src/layout.c index 024876a28..737a1cd64 100644 --- a/src/layout.c +++ b/src/layout.c @@ -587,10 +587,15 @@ void init_curses (void) initscr(); #ifdef HAVE_ESCDELAY /* - * If ncurses exports the ESCDELAY variable it should be set to 0 - * or you'll have to press Esc three times to dismiss a dialog box. + * If ncurses exports the ESCDELAY variable, it should be set to + * a low value, or you'll experience a delay in processing escape + * sequences that are recognized by mc (e.g. Esc-Esc). On the other + * hand, making ESCDELAY too small can result in some sequences + * (e.g. cursor arrows) being reported as separate keys under heavy + * processor load, and this can be a problem if mc hasn't learned + * them in the "Learn Keys" dialog. The value is in milliseconds. */ - ESCDELAY = 0; + ESCDELAY = 200; #endif /* HAVE_ESCDELAY */ do_enter_ca_mode (); mc_raw_mode ();