Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 3.0.5: terminal size should not be reset by zsh -c
- X-seq: zsh-workers 3649
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh@xxxxxxxx
- Subject: PATCH: 3.0.5: terminal size should not be reset by zsh -c
- Date: Tue, 9 Dec 1997 22:47:35 -0800
- Cc: zsh-workers@xxxxxxxxxxxxxxx
Stack trace leading to the bug:
#7 0x804a0ee in ___crt_dummy__ ()
#6 0x8070ddf in main () at init.c:69
#5 0x8072392 in setupvals () at init.c:618
#4 0x807e2cd in createparamtable () at params.c:115
#3 0x808137d in setsparam () at params.c:1010
#2 0x8080af7 in setstrvalue () at params.c:827
#1 0x8081a7b in zlevarsetfn () at params.c:1247
#0 adjustwinsize () at utils.c:882
Breakpoint 1, adjustwinsize (from=2) at ../../zsh-3.0.5/Src/utils.c:882
Suggested fix:
Index: Src/utils.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.0/Src/utils.c,v
retrieving revision 1.10
diff -c -r1.10 utils.c
*** utils.c 1997/11/19 16:40:31 1.10
--- utils.c 1997/12/10 06:37:12
***************
*** 876,882 ****
termflags |= TERM_NARROW;
#ifdef TIOCGWINSZ
! if (from >= 2) {
shttyinfo.winsize.ws_row = lines;
shttyinfo.winsize.ws_col = columns;
ioctl(SHTTY, TIOCSWINSZ, (char *)&shttyinfo.winsize);
--- 876,882 ----
termflags |= TERM_NARROW;
#ifdef TIOCGWINSZ
! if (interact && from >= 2) {
shttyinfo.winsize.ws_row = lines;
shttyinfo.winsize.ws_col = columns;
ioctl(SHTTY, TIOCSWINSZ, (char *)&shttyinfo.winsize);
I'm not entirely sure that "if (zleactive && from >= 2)" wouldn't be a
more appropriate test, but this one gets the job done.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author