diff options
author | Kevin McCarthy <kevin@8t8.us> | 2021-06-19 14:08:59 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-06-19 14:37:37 -0700 |
commit | f5ccd687348a8a97bb442d031bdd4e68091615c0 (patch) | |
tree | 557c424e9277fae930b7fd36af195b6ee666bff1 | |
parent | e1dfc2c43b275af813a38c8e3d6a2d6e30ba9a06 (diff) |
Fix menu.c sigwinch handling order.
This fixes problems with a sigwinch that occurs during an external
process, such as during a query menu lookup, or after exiting the
background-edit landing page. Without this change, the user would see
a misdrawn screen and would need to press a key first.
Change it so that the SigWinch flag is handled before reading input,
so that the page is automatically redrawn. This matches the behavior
in the index, pager, and background-edit process list menu.
-rw-r--r-- | menu.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1071,6 +1071,16 @@ int mutt_menuLoop (MUTTMENU *menu) mutt_refresh (); +#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) + if (SigWinch) + { + SigWinch = 0; + mutt_resize_screen (); + clearok(stdscr,TRUE);/*force complete redraw*/ + continue; + } +#endif + /* try to catch dialog keys before ops */ if (menu->dialog && menu_dialog_dokey (menu, &i) == 0) return i; @@ -1107,15 +1117,6 @@ int mutt_menuLoop (MUTTMENU *menu) mutt_curs_set (1); -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) - if (SigWinch) - { - SigWinch = 0; - mutt_resize_screen (); - clearok(stdscr,TRUE);/*force complete redraw*/ - } -#endif - if (i < 0) { if (menu->tagprefix) |