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
Этот коммит содержится в:
родитель
8d42a3bfaa
Коммит
85c775a3a3
@ -148,6 +148,9 @@ CVS code -
|
|||||||
do_suspend(), do_input(), rcfile_error(), parse_argument(),
|
do_suspend(), do_input(), rcfile_error(), parse_argument(),
|
||||||
parse_rcfile(), nano.1, nano.texi, and nanorc.sample.in.
|
parse_rcfile(), nano.1, nano.texi, and nanorc.sample.in.
|
||||||
(Benno Schulenberg, minor tweaks by DLR and Nick Warne)
|
(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:
|
- browser.c:
|
||||||
do_browser()
|
do_browser()
|
||||||
- Reference NANO_GOTODIR_(ALT|F)?KEY instead of
|
- Reference NANO_GOTODIR_(ALT|F)?KEY instead of
|
||||||
@ -265,9 +268,6 @@ CVS code -
|
|||||||
(DLR, found by Benno Schulenberg)
|
(DLR, found by Benno Schulenberg)
|
||||||
renumber()
|
renumber()
|
||||||
- Remove invalid assert. (DLR, found by Filipe Moreira)
|
- Remove invalid assert. (DLR, found by Filipe Moreira)
|
||||||
do_suspend()
|
|
||||||
- Add an extra newline before "Use \"fg\" to return to nano".
|
|
||||||
(DLR)
|
|
||||||
do_input()
|
do_input()
|
||||||
- Remove redundant check for allow_funcs' being TRUE when we get
|
- Remove redundant check for allow_funcs' being TRUE when we get
|
||||||
KEY_MOUSE. (DLR)
|
KEY_MOUSE. (DLR)
|
||||||
|
19
src/nano.c
19
src/nano.c
@ -993,10 +993,13 @@ RETSIGTYPE handle_hupterm(int signal)
|
|||||||
/* Handler for SIGTSTP (suspend). */
|
/* Handler for SIGTSTP (suspend). */
|
||||||
RETSIGTYPE do_suspend(int signal)
|
RETSIGTYPE do_suspend(int signal)
|
||||||
{
|
{
|
||||||
/* Temporarily leave curses mode. */
|
/* Blank the screen, and move the cursor to the last line of it. */
|
||||||
endwin();
|
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);
|
fflush(stdout);
|
||||||
|
|
||||||
/* Restore the old terminal settings. */
|
/* Restore the old terminal settings. */
|
||||||
@ -1017,11 +1020,15 @@ RETSIGTYPE do_continue(int signal)
|
|||||||
{
|
{
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* Perhaps the user resized the window while we slept. Handle it,
|
/* 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);
|
handle_sigwinch(0);
|
||||||
#else
|
#else
|
||||||
/* Reenter curses mode, and update the screen in the process. */
|
/* Restore the terminal to its previous state. */
|
||||||
doupdate();
|
terminal_init();
|
||||||
|
|
||||||
|
/* Update the screen. */
|
||||||
|
total_refresh();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user