summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-06-10 08:51:30 +0800
committerKevin McCarthy <kevin@8t8.us>2018-06-10 08:51:30 +0800
commit1acb708bcfc745c0613ecc830a720298009b2f1c (patch)
treeee4f41702171370e0a45db0c5df6e6fe7115f434 /curs_lib.c
parent96b1449f99abcbce116aa949f6882921b5cbf223 (diff)
Move mutt_getch() timeout value into curs_lib.c
Change monitor.c to reference the curs_lib value, instead of vice-versa. We need to store the value for both monitor.c's poll and for mutt_monitor_ch() to perform an initial non-blocking check of ncurses' getch() buffer.
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/curs_lib.c b/curs_lib.c
index d1f88da1..5472f45e 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -76,6 +76,7 @@ static size_t UngetCount = 0;
static size_t UngetLen = 0;
static event_t *UngetKeyEvents;
+int MuttGetchTimeout = -1;
mutt_window_t *MuttHelpWindow = NULL;
mutt_window_t *MuttIndexWindow = NULL;
@@ -121,10 +122,8 @@ void mutt_need_hard_redraw (void)
*/
void mutt_getch_timeout (int delay)
{
+ MuttGetchTimeout = delay;
timeout (delay);
-#ifdef USE_INOTIFY
- mutt_monitor_set_poll_timeout (delay);
-#endif
}
#ifdef USE_INOTIFY
@@ -136,7 +135,7 @@ static int mutt_monitor_getch (void)
* we need to make sure there isn't a character waiting */
timeout (0);
ch = getch ();
- timeout (mutt_monitor_get_poll_timeout ());
+ timeout (MuttGetchTimeout);
if (ch == ERR)
{
if (mutt_monitor_poll () != 0)