mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
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:
parent
6969c995d1
commit
3fe08acd27
@ -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
|
||||
|
16
src/text.c
16
src/text.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user