Commit 3fe08acd authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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