Commit 85c775a3 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 16 additions and 9 deletions
+16 -9
......@@ -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)
......
......@@ -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
}
......
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