From deba0e1c9c40ec32988e36b20f42ee3065d8d6d1 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Thu, 22 Sep 2016 14:07:18 -0700 Subject: Don't abort the menu editor on sigwinch. (closes #3875) getch() will return ERR on sigwinch when timeout() is called with a positive value. mutt_getch() will therefore return ch==-2 for both a timeout and a sigwinch in this case. The imap code in km_dokey() exits out of the ImapKeepalive loop for a SigWinch, and was skipping past the check for MENU_EDITOR and tmp.ch==-2. Move this check below the gotkey: label so the ImapKeepalive loop behaves the same as the Timeout code. Thanks to nicop for reporting the problem and for the initial patch! --- curs_lib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'curs_lib.c') diff --git a/curs_lib.c b/curs_lib.c index 8b21c43f..b747b50d 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -125,9 +125,10 @@ event_t mutt_getch (void) return err; } - if(ch == ERR) + /* either timeout, a sigwinch (if timeout is set), or the terminal + * has been lost */ + if (ch == ERR) { - /* either timeout or the terminal has been lost */ if (!isatty (0)) { endwin (); -- cgit v1.2.3