Commit a969adf8 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

suspension: fake a SIGWINCH when coming back out of the background

When receiving a SIGCONT, don't call regenerate_screen() directly
but act as if a SIGWINCH occurred.  Also insert a dummy key, and
thus let the relevant input routine redraw the relevant subwindows.

Use KEY_F0 as the dummy key, as both Ncurses and Slang know it, and
it should normally do nothing at all.

This fixes https://savannah.gnu.org/bugs/?51124.
parent 59b0f81b
Showing with 6 additions and 4 deletions
+6 -4
......@@ -1267,9 +1267,10 @@ RETSIGTYPE do_continue(int signal)
#endif
#ifndef NANO_TINY
/* Perhaps the user resized the window while we slept. So act as if,
* and restore the terminal to its previous state in the process. */
regenerate_screen();
/* Perhaps the user resized the window while we slept. So set that
* flag, and tickle the input routine so that it will see the flag. */
the_window_resized = TRUE;
ungetch(KEY_F0);
#else
/* Restore the state of the terminal and redraw the whole screen. */
terminal_init();
......
......@@ -701,8 +701,9 @@ int parse_kbinput(WINDOW *win)
#ifdef KEY_RESIZE
/* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */
case KEY_RESIZE:
return ERR;
#endif
case KEY_F0:
return ERR;
}
return retval;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment