From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh@peak.org
Cc: zsh-workers@math.gatech.edu
Subject: PATCH: 3.0.5: terminal size should not be reset by zsh -c
Date: Tue, 9 Dec 1997 22:47:35 -0800 [thread overview]
Message-ID: <971209224735.ZM11949@candle.brasslantern.com> (raw)
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
reply other threads:[~1997-12-10 7:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=971209224735.ZM11949@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@math.gatech.edu \
--cc=zsh@peak.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).