aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEon S. Jeon <esjeon@hyunmu.am>2013-12-17 12:45:38 -0500
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2013-12-18 08:11:22 +0100
commitd60ee7337b5f378d8858ef3774c5552d2c8e54fa (patch)
treee9714ff107355f235ddfbbe6fe629a98579890fc
parentef1dc9fc4bdfcd944b054c329bb5d51b8c52eb5c (diff)
downloadst-patched-d60ee7337b5f378d8858ef3774c5552d2c8e54fa.tar.bz2
st-patched-d60ee7337b5f378d8858ef3774c5552d2c8e54fa.tar.xz
st-patched-d60ee7337b5f378d8858ef3774c5552d2c8e54fa.zip
Prevent resizing stdin
This fixes a bug that the parent tty gets resized whenever you launch st through command line. The problem was that ioctl was resizing cmdfd before it gets initialized in ttynew. Since cmdfd is a global variable, its initial value is 0, and consequently stdin was being resized.
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index f883ac1..4fb3311 100644
--- a/st.c
+++ b/st.c
@@ -3667,11 +3667,11 @@ run(void) {
3667 } 3667 }
3668 } 3668 }
3669 3669
3670 ttynew();
3670 if(!xw.isfixed) 3671 if(!xw.isfixed)
3671 cresize(w, h); 3672 cresize(w, h);
3672 else 3673 else
3673 cresize(xw.fw, xw.fh); 3674 cresize(xw.fw, xw.fh);
3674 ttynew();
3675 3675
3676 gettimeofday(&lastblink, NULL); 3676 gettimeofday(&lastblink, NULL);
3677 gettimeofday(&last, NULL); 3677 gettimeofday(&last, NULL);