use doupdate() instead of refresh() to reenter curses mode

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2990 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2005-08-14 20:08:49 +00:00
parent 31de105eec
commit 84fdb90e52
3 changed files with 10 additions and 4 deletions

View File

@ -229,6 +229,8 @@ CVS code -
is running, so that it can handle them, and unblock them once is running, so that it can handle them, and unblock them once
it's finished and we've loaded the spell-checked file back in. it's finished and we've loaded the spell-checked file back in.
(DLR) (DLR)
- Use doupdate() to reenter curses mode instead of refresh().
(DLR)
do_spell() do_spell()
- When displaying an error message from do_(int|alt)_speller(), - When displaying an error message from do_(int|alt)_speller(),
don't display the error message corresponding to errno if don't display the error message corresponding to errno if
@ -236,6 +238,9 @@ CVS code -
do_justify() do_justify()
- If constant cursor position display is on, make sure the - If constant cursor position display is on, make sure the
cursor position is displayed properly when we finish. (DLR) cursor position is displayed properly when we finish. (DLR)
handle_sigwinch()
- Use doupdate() to reenter curses mode instead of refresh().
(DLR)
allow_pending_sigwinch() allow_pending_sigwinch()
- Simplify by using the "?" operator instead of an if clause. - Simplify by using the "?" operator instead of an if clause.
(DLR) (DLR)

View File

@ -1333,11 +1333,11 @@ void do_suspend(int signal)
void do_cont(int signal) void do_cont(int signal)
{ {
#ifndef NANO_SMALL #ifndef NANO_SMALL
/* 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 update the screen in the process. */
handle_sigwinch(0); handle_sigwinch(0);
#else #else
/* Just update the screen. */ /* Reenter curses mode, and update the screen in the process. */
doupdate(); doupdate();
#endif #endif
} }
@ -1391,7 +1391,7 @@ void handle_sigwinch(int s)
/* Do the equivalent of what Minimum Profit does: Leave and /* Do the equivalent of what Minimum Profit does: Leave and
* immediately reenter curses mode. */ * immediately reenter curses mode. */
endwin(); endwin();
refresh(); doupdate();
#endif #endif
/* Restore the terminal to its previous state. */ /* Restore the terminal to its previous state. */

View File

@ -1894,7 +1894,8 @@ const char *do_alt_speller(char *tempfile_name)
/* Wait for the alternate spell checker to finish. */ /* Wait for the alternate spell checker to finish. */
wait(&alt_spell_status); wait(&alt_spell_status);
refresh(); /* Reenter curses mode. */
doupdate();
/* Restore the terminal to its previous state. */ /* Restore the terminal to its previous state. */
terminal_init(); terminal_init();