tweaks: there is no reason to block SIGWINCHes while waiting for speller
In the past, SIGWINCHes were responded to immediately (which was madness),
but since commit 75d64e67
all a SIGWINCH does is set a flag so that, when
the time comes to update the screen, nano knows the dimensions may have
changed. The mentioned commit removed most blockings and unblockings of
SIGWINCH, but not this one.
master
parent
818ee3e68c
commit
1f39f60b2f
11
src/nano.c
11
src/nano.c
|
@ -1364,17 +1364,6 @@ void regenerate_screen(void)
|
|||
total_refresh();
|
||||
}
|
||||
|
||||
/* If allow is FALSE, block any SIGWINCH signal. If allow is TRUE,
|
||||
* unblock SIGWINCH so any pending ones can be dealt with. */
|
||||
void allow_sigwinch(bool allow)
|
||||
{
|
||||
sigset_t winch;
|
||||
|
||||
sigemptyset(&winch);
|
||||
sigaddset(&winch, SIGWINCH);
|
||||
sigprocmask(allow ? SIG_UNBLOCK : SIG_BLOCK, &winch, NULL);
|
||||
}
|
||||
|
||||
/* Handle the global toggle specified in flag. */
|
||||
void do_toggle(int flag)
|
||||
{
|
||||
|
|
|
@ -433,7 +433,6 @@ RETSIGTYPE do_continue(int signal);
|
|||
#ifndef NANO_TINY
|
||||
RETSIGTYPE handle_sigwinch(int signal);
|
||||
void regenerate_screen(void);
|
||||
void allow_sigwinch(bool allow);
|
||||
void do_toggle(int flag);
|
||||
void enable_signals(void);
|
||||
#endif
|
||||
|
|
10
src/text.c
10
src/text.c
|
@ -2881,11 +2881,6 @@ const char *do_alt_speller(char *tempfile_name)
|
|||
} else if (pid_spell < 0)
|
||||
return _("Could not fork");
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Block SIGWINCHes so the spell checker doesn't get any. */
|
||||
allow_sigwinch(FALSE);
|
||||
#endif
|
||||
|
||||
/* Wait for the alternate spell checker to finish. */
|
||||
wait(&alt_spell_status);
|
||||
|
||||
|
@ -2940,11 +2935,6 @@ const char *do_alt_speller(char *tempfile_name)
|
|||
adjust_viewport(STATIONARY);
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Unblock SIGWINCHes again. */
|
||||
allow_sigwinch(TRUE);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue