Răsfoiți Sursa

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.
Eon S. Jeon 11 ani în urmă
părinte
comite
d60ee7337b
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      st.c

+ 1 - 1
st.c

@@ -3667,11 +3667,11 @@ run(void) {
 		}
 	}
 
+	ttynew();
 	if(!xw.isfixed)
 		cresize(w, h);
 	else
 		cresize(xw.fw, xw.fh);
-	ttynew();
 
 	gettimeofday(&lastblink, NULL);
 	gettimeofday(&last, NULL);