summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-06-03 14:05:13 -0700
committerKevin McCarthy <kevin@8t8.us>2018-06-03 14:05:13 -0700
commit0182dc8576165ae9dd16a34728406222aed8bc30 (patch)
treecc0442f1516fa6fc92c74ec2521599378824132f /curs_lib.c
parentf495b84d3f56a0eabfbf7ad61c4ce5bfbbd1e896 (diff)
Change direct mutt_getch() callers to handle new mail event.
The inotify handler now returns -2 (timeout) on a new mail event. Change the direct callers to ignore, so prompts aren't strangely aborted. Also, fix mutt_change_flag() to call mutt_refresh() before the prompt. Apparently ncurses getch() was doing this for us, but now that we are polling STDIN instead, the prompt wasn't displaying.
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/curs_lib.c b/curs_lib.c
index 85d29688..a8635e59 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -932,7 +932,10 @@ int _mutt_enter_fname (const char *prompt, char *buf, size_t blen, int buffy, in
mutt_window_clrtoeol (MuttMessageWindow);
mutt_refresh ();
- ch = mutt_getch();
+ do
+ {
+ ch = mutt_getch();
+ } while (ch.ch == -2);
if (ch.ch < 0)
{
mutt_window_clearline (MuttMessageWindow, 0);