summaryrefslogtreecommitdiff
path: root/libre/mc/0002-Do-not-botch-SIGWINCH-delivery-to-the-subshell.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/mc/0002-Do-not-botch-SIGWINCH-delivery-to-the-subshell.patch')
-rw-r--r--libre/mc/0002-Do-not-botch-SIGWINCH-delivery-to-the-subshell.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/libre/mc/0002-Do-not-botch-SIGWINCH-delivery-to-the-subshell.patch b/libre/mc/0002-Do-not-botch-SIGWINCH-delivery-to-the-subshell.patch
new file mode 100644
index 000000000..ea4f21116
--- /dev/null
+++ b/libre/mc/0002-Do-not-botch-SIGWINCH-delivery-to-the-subshell.patch
@@ -0,0 +1,68 @@
+From 968882335abb18e69be39dc4fd444f78f0a14a0f Mon Sep 17 00:00:00 2001
+From: Yuri Khan <yurivkhan@gmail.com>
+Date: Mon, 9 May 2016 18:04:21 +0600
+Subject: [PATCH 2/2] Do not botch SIGWINCH delivery to the subshell.
+
+Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
+---
+ lib/tty/tty-slang.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c
+index 143a6d3..87e4a70 100644
+--- a/lib/tty/tty-slang.c
++++ b/lib/tty/tty-slang.c
+@@ -83,6 +83,8 @@ static struct termios new_mode;
+ /* Controls whether we should wait for input in tty_lowlevel_getch */
+ static gboolean no_slang_delay;
+
++static gboolean slsmg_active = FALSE;
++
+ /* This table describes which capabilities we want and which values we
+ * assign to them.
+ */
+@@ -329,6 +331,7 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
+ tty_display_8bit (FALSE);
+
+ SLsmg_init_smg ();
++ slsmg_active = TRUE;
+ if (!mouse_enable)
+ use_mouse_p = MOUSE_DISABLED;
+ tty_init_xterm_support (is_xterm); /* do it before tty_enter_ca_mode() call */
+@@ -354,6 +357,7 @@ tty_shutdown (void)
+ tty_reset_screen ();
+ tty_exit_ca_mode ();
+ SLang_reset_tty ();
++ slsmg_active = FALSE;
+
+ /* Load the op capability to reset the colors to those that were
+ * active when the program was started up
+@@ -388,7 +392,8 @@ void
+ tty_change_screen_size (void)
+ {
+ SLtt_get_screen_size ();
+- SLsmg_reinit_smg ();
++ if (slsmg_active)
++ SLsmg_reinit_smg ();
+
+ #ifdef ENABLE_SUBSHELL
+ if (mc_global.tty.use_subshell)
+@@ -404,6 +409,7 @@ tty_reset_prog_mode (void)
+ {
+ tcsetattr (SLang_TT_Read_FD, TCSANOW, &new_mode);
+ SLsmg_init_smg ();
++ slsmg_active = TRUE;
+ SLsmg_touch_lines (0, LINES);
+ }
+
+@@ -504,6 +510,7 @@ int
+ tty_reset_screen (void)
+ {
+ SLsmg_reset_smg ();
++ slsmg_active = FALSE;
+ return 0; /* OK */
+ }
+
+--
+2.10.0
+