From: Geoff Wing <mason@primenet.com.au>
To: zsh-workers@math.gatech.edu
Cc: hzoli@cs.elte.hu (Zoltan Hidvegi)
Subject: zle_refresh.c patch (Was: New zed and refresh bug)
Date: Tue, 30 Jul 1996 16:20:17 +1000 (EST) [thread overview]
Message-ID: <199607300620.QAA02760@coral.primenet.com.au> (raw)
In-Reply-To: <199607300452.OAA02241@coral.primenet.com.au> from "Geoff Wing" at Jul 30, 96 02:52:11 pm
I wrote:
:Zoltan Hidvegi wrote:
::> Zoltan wrote:
::> :It demonstrates a zle bug. Just load this zed function, unset the BAUD
::> :parameter (to get half-screen scrolls in zed), invoke zed -f zed, and use
::> :the up-arrow to move to the top of the function. On a 80x25 Linux console
::> :with ncurses a bogous `if [[ -f $dir/$1 ]' appears on the 5th screen line
::> :after the second half-screen scroll.
:OK. I can repro it now - doesn't look good. Yep, looks like an insert problem.
:Will send a fix in soon (Should be today or tomorrow (Wednesday)). Also will
:change 9600 to 19200 as the minimum speed for single line scroll (unless anyone
:thinks it should be 38400?)
I'll go over the logic for this again to confirm it but this should fix it.
I used the number of inserted characters twice in the calculations.
A couple of other matters:
1) If you have a line with more than a screenful of stuff, then CTRL-U it
(kill-whole-line), you don't always get your RPROMPT rewritten. I haven't
found an exact repro method yet (nor checked the code). Will look into it
a bit later.
2) testing "zed -f zed" lots of times and moving up and down between
screenfuls twenty or more times, spewed out some allocation errors and
coredumped. This is with all the ZSH_MEM stuff compiled in. The coredump
didn't make sense (said it died during a putc() which was valid) and
I've lost that coredump (overwritten by others) and I can't repro it.
So unless someone else comes across it, nothing can be done. Perhaps it was
due to my OS (NetBSD 1.2_BETA).
I'm just mentioning this to encourage testers to compile in ZSH_MEM stuff
Perhaps we need an option in configure: --enable-zsh-debug-all which enables
all the zsh configure options? (Save me having to type in six --enable things
every time :-)
Anyway, here's the patch:
*** zle_refresh.c 1996/07/19 17:04:33 2.9
--- zle_refresh.c 1996/07/30 05:45:42
***************
*** 122,128 ****
int t0, hwinh;
char *s;
! if (tline || baudrate >= 9600) { /* single line scroll */
hwinh = 1;
s = nbuf[tline];
for (t0 = tline; t0 < winh - 1; t0++)
--- 122,128 ----
int t0, hwinh;
char *s;
! if (tline || baudrate >= 19200) { /* single line scroll */
hwinh = 1;
s = nbuf[tline];
for (t0 = tline; t0 < winh - 1; t0++)
***************
*** 642,648 ****
nl = p1;
char_ins += i;
/* if we've pushed off the right, trucate oldline */
! for (j = ccs, p1 = ol; *p1 && j + char_ins < winw;
p1++, j++);
if (j + char_ins == winw)
*p1 = '\0';
--- 642,648 ----
nl = p1;
char_ins += i;
/* if we've pushed off the right, trucate oldline */
! for (j = ccs - i, p1 = ol; *p1 && j + char_ins < winw;
p1++, j++);
if (j + char_ins == winw)
*p1 = '\0';
--
Geoff Wing [mason@primenet.com.au] PrimeNet - Internet Consultancy
prev parent reply other threads:[~1996-07-30 6:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-28 20:36 New zed and refresh bug Zoltan Hidvegi
1996-07-29 13:34 ` Peter Stephenson
1996-07-29 14:03 ` Zoltan Hidvegi
1996-07-29 14:21 ` Zoltan Hidvegi
1996-08-03 16:00 ` Bart Schaefer
1996-08-04 0:42 ` Zoltan Hidvegi
1996-08-04 1:41 ` Local variables and "typeset" Bart Schaefer
1996-07-29 15:11 ` New zed and refresh bug Geoff Wing
1996-07-29 17:21 ` Zoltan Hidvegi
1996-07-30 4:52 ` Geoff Wing
1996-07-30 6:20 ` Geoff Wing [this message]
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=199607300620.QAA02760@coral.primenet.com.au \
--to=mason@primenet.com.au \
--cc=hzoli@cs.elte.hu \
--cc=zsh-workers@math.gatech.edu \
/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).