and don't let a SIGWINCH throw out the changes made by the alternate

spell checker, either


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2005-07-26 01:17:16 +00:00
parent 6969c995d1
commit 3fe08acd27
2 changed files with 13 additions and 7 deletions

View File

@ -174,7 +174,9 @@ CVS code -
what the internal spell checker returns under the same
circumstances. (DLR)
- Block any pending SIGWINCHes while the alternate spell checker
is running, so that it can handle them. (DLR)
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.
(DLR)
do_spell()
- When displaying an error message from do_(int|alt)_speller(),
don't display the error message corresponding to errno if

View File

@ -1887,18 +1887,13 @@ const char *do_alt_speller(char *tempfile_name)
#ifndef NANO_SMALL
/* Don't handle a pending SIGWINCH until the alternate spell checker
* is finished. */
* is finished and we've loaded the spell-checked file back in. */
allow_pending_sigwinch(FALSE);
#endif
/* Wait for the alternate spell checker to finish. */
wait(&alt_spell_status);
#ifndef NANO_SMALL
/* Handle a pending SIGWINCH again. */
allow_pending_sigwinch(TRUE);
#endif
refresh();
/* Restore the terminal to its previous state. */
@ -1907,6 +1902,10 @@ const char *do_alt_speller(char *tempfile_name)
/* Turn the cursor back on for sure. */
curs_set(1);
/* The screen might have been resized. If it has, reinitialize all
* the windows based on the new screen dimensions. */
window_init();
if (!WIFEXITED(alt_spell_status) ||
WEXITSTATUS(alt_spell_status) != 0) {
char *altspell_error;
@ -2005,6 +2004,11 @@ const char *do_alt_speller(char *tempfile_name)
do_gotopos(lineno_save, current_x_save, current_y_save, pww_save);
set_modified();
#ifndef NANO_SMALL
/* Handle a pending SIGWINCH again. */
allow_pending_sigwinch(TRUE);
#endif
return NULL;
}