make suspension clear the screen and put the cursor on the last line

before displaying anything, as Pico does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2006-06-09 16:04:19 +00:00
parent 8d42a3bfaa
commit 85c775a3a3
2 changed files with 16 additions and 9 deletions

View File

@ -148,6 +148,9 @@ CVS code -
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
@ -265,9 +268,6 @@ CVS code -
(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)

View File

@ -993,10 +993,13 @@ RETSIGTYPE handle_hupterm(int signal)
/* 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. */
@ -1017,11 +1020,15 @@ RETSIGTYPE do_continue(int signal)
{
#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
}