do_suspend(), do_input(), rcfile_error(), parse_argument(),
parse_rcfile(), nano.1, nano.texi, and nanorc.sample.in.
(Benno Schulenberg, minor tweaks by DLR and Nick Warne)
+ - Make suspension clear the screen and put the cursor on the
+ last line before displaying anything, as Pico does. Changes
+ to do_suspend() and do_continue(). (DLR)
- browser.c:
do_browser()
- Reference NANO_GOTODIR_(ALT|F)?KEY instead of
(DLR, found by Benno Schulenberg)
renumber()
- Remove invalid assert. (DLR, found by Filipe Moreira)
- do_suspend()
- - Add an extra newline before "Use \"fg\" to return to nano".
- (DLR)
do_input()
- Remove redundant check for allow_funcs' being TRUE when we get
KEY_MOUSE. (DLR)
/* Handler for SIGTSTP (suspend). */
RETSIGTYPE do_suspend(int signal)
{
- /* Temporarily leave curses mode. */
- endwin();
+ /* Blank the screen, and move the cursor to the last line of it. */
+ erase();
+ move(LINES - 1, 0);
+ refresh();
- printf("\n\n\n\n\n\n%s\n", _("Use \"fg\" to return to nano."));
+ /* Display our helpful message. */
+ printf(_("Use \"fg\" to return to nano.\n"));
fflush(stdout);
/* Restore the old terminal settings. */
{
#ifndef NANO_TINY
/* Perhaps the user resized the window while we slept. Handle it,
- * and update the screen in the process. */
+ * and restore the terminal to its previous state and update the
+ * screen in the process. */
handle_sigwinch(0);
#else
- /* Reenter curses mode, and update the screen in the process. */
- doupdate();
+ /* Restore the terminal to its previous state. */
+ terminal_init();
+
+ /* Update the screen. */
+ total_refresh();
#endif
}