diff options
author | Kevin McCarthy <kevin@8t8.us> | 2016-09-22 14:07:18 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2016-09-22 14:07:18 -0700 |
commit | deba0e1c9c40ec32988e36b20f42ee3065d8d6d1 (patch) | |
tree | 3413980724be2309722f7d5f8d5dee05e9ee2595 /curs_lib.c | |
parent | 4dd44e18097542786eee9d7360eabce7b1f483bf (diff) |
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!
Diffstat (limited to 'curs_lib.c')
-rw-r--r-- | curs_lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 (); |