display: don't let a SIGCONT write anything to the screen
The old praxis of calling total_refresh() upon a SIGCONT was confusing, because the screen would look as if nano had returned from suspension, but in fact the shell was still active. Instead of calling total_refresh(), put a no-op key into ncurses' buffer, so that, when nano actually does return out of suspension (through 'fg'), this key will be read and discarded, upon which nano will go sit and wait for the next key, just before which it calls doupdate(). The latter is all we need to get the entire screen restored. This also fixes https://savannah.gnu.org/bugs/?51131 for "tiny".master
parent
a2038a9b2b
commit
84ff9ebb91
|
@ -1267,15 +1267,14 @@ RETSIGTYPE do_continue(int signal)
|
|||
#endif
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* 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. */
|
||||
/* Perhaps the user resized the window while we slept. */
|
||||
the_window_resized = TRUE;
|
||||
ungetch(KEY_F0);
|
||||
#else
|
||||
/* Restore the state of the terminal and redraw the whole screen. */
|
||||
/* Restore the state of the terminal. */
|
||||
terminal_init();
|
||||
total_refresh();
|
||||
#endif
|
||||
/* Tickle the input routine so it will update the screen. */
|
||||
ungetch(KEY_F0);
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
|
|
Loading…
Reference in New Issue