summaryrefslogtreecommitdiffstats
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index e98911e0f8..da7f56a675 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -7494,7 +7494,19 @@ gpm_open(void)
return 1; // succeed
}
if (gpm_fd == -2)
+ {
Gpm_Close(); // We don't want to talk to xterm via gpm
+
+ // Gpm_Close fails to properly restore the WINCH and TSTP handlers,
+ // leading to Vim ignoring resize signals. We have to re-initialize
+ // these handlers again here.
+# ifdef SIGWINCH
+ mch_signal(SIGWINCH, sig_winch);
+# endif
+# ifdef SIGTSTP
+ mch_signal(SIGTSTP, restricted ? SIG_IGN : sig_tstp);
+# endif
+ }
return 0;
}