1
0
forked from aniani/vim

patch 8.2.4201: when using the GUI CTRL-Z does not stop gvim

Problem:    When using the GUI CTRL-Z does not stop gvim.
Solution:   When using the GUI set SIGTSTP to SIG_DFL. (Andrew Maltsev,
            closes #9570)
This commit is contained in:
Bram Moolenaar
2022-01-24 12:20:45 +00:00
parent 7e765a39b7
commit 8e4af851fd
2 changed files with 10 additions and 1 deletions

View File

@@ -1378,7 +1378,14 @@ set_signals(void)
#ifdef SIGTSTP
// See mch_init() for the conditions under which we ignore SIGTSTP.
signal(SIGTSTP, ignore_sigtstp ? SIG_IGN : (RETSIGTYPE (*)())sig_tstp);
// In the GUI default TSTP processing is OK.
// Checking both gui.in_use and gui.starting because gui.in_use is not set
// at this point (set after menus are displayed), but gui.starting is set.
signal(SIGTSTP, ignore_sigtstp ? SIG_IGN
# ifdef FEAT_GUI
: gui.in_use || gui.starting ? SIG_DFL
# endif
: (RETSIGTYPE (*)())sig_tstp);
#endif
#if defined(SIGCONT)
signal(SIGCONT, sigcont_handler);

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4201,
/**/
4200,
/**/