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.
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);
case OP_EDITOR_QUOTE_CHAR:
{
struct Event event;
- event = mutt_getch();
+ do
+ {
+ event = mutt_getch();
+ } while (event.ch == -2);
if (event.ch >= 0)
{
LastKey = event.ch;
mutt_window_mvprintw(MuttMessageWindow, 0, 0,
"%s? (D/N/O/r/*/!): ", bf ? _("Set flag") : _("Clear flag"));
mutt_window_clrtoeol(MuttMessageWindow);
+ mutt_refresh();
- event = mutt_getch();
+ do
+ {
+ event = mutt_getch();
+ } while (event.ch == -2);
i = event.ch;
if (i < 0)
{
struct Event ch;
char *p = NULL;
- ch = mutt_getch();
+ do
+ {
+ ch = mutt_getch();
+ } while (ch.ch == -2);
if (ch.ch < 0)
{