summaryrefslogtreecommitdiffstats
path: root/keymap.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-10-28 16:39:53 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-10-28 16:39:53 +0000
commita5b53e11f704384044adf1c378627dd102d0cc03 (patch)
tree38e691b517533327556fbbde4408a3ddf9dd71b8 /keymap.c
parent556dbd8900b46a08719b664a80e04568ce4d0e4a (diff)
Gero Treuner's help-wrap patch.
Diffstat (limited to 'keymap.c')
-rw-r--r--keymap.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/keymap.c b/keymap.c
index a58b699f..91bd2a69 100644
--- a/keymap.c
+++ b/keymap.c
@@ -343,7 +343,24 @@ int km_dokey (int menu)
FOREVER
{
+/* ncurses doesn't return on resized screen when timeout is set to zero */
+#if !defined (USE_SLANG_CURSES) && defined (HAVE_RESIZETERM)
+ if (menu == MENU_MAIN || menu == MENU_PAGER)
+ timeout (menu == MENU_MAIN && Timeout > 0 ? Timeout * 1000 : INT_MAX);
+#else
+ if (menu == MENU_MAIN && Timeout > 0)
+ timeout (Timeout * 1000); /* milliseconds */
+#endif
+
tmp = mutt_getch();
+
+#if !defined (USE_SLANG_CURSES) && defined (HAVE_RESIZETERM)
+ if (menu == MENU_MAIN || menu == MENU_PAGER)
+#else
+ if (menu == MENU_MAIN && Timeout > 0)
+#endif
+ timeout (-1); /* restore blocking operation */
+
LastKey = tmp.ch;
if (LastKey == -1)
return -1;