* Zle redisplay bug in pws-24
@ 1999-06-27 9:38 Bart Schaefer
1999-06-27 20:17 ` Geoff Wing
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 1999-06-27 9:38 UTC (permalink / raw)
To: zsh-workers
It's probably present in other versions too ... yup, 3.0.6-pre-5 has it ..
It happens with a multiline buffer, and appears to have something to do with
killing a line that is exactly one character shorter than the width of the
terminal. Here's how I reproduced it:
Start with a prompt string that's ten characters long (e.g. "zagzig<2> " was
mine at the time). In netscape, go to article 6850 in the zsh-workers
archive; drag-select the patch at the end (from "---" through "sleep(1);").
Back in your zsh terminal, start a here-document ("patch -p0 -R <<'EOF'")
and then paste in the text. Finish with EOF and hit return. Note that
the patch fails because of whitespace differences (sigh). Hit ctrl-P to
call back the here-document and move up to edit the "patch" line. Decide
that's not what you want to do after all and idly begin tapping ctrl-K
until you see:
zagzig<2> while ((ttpgrp = gettygrp()) != -1 && ttpgrp != mypgrp) {
sleep(1);
EOF
The cursor at this moment is right after the prompt. Hit ctrl-K again and
you see (cursor represented by an underscore):
_
zagzig<7> sleep(1);
EOF
Whoops, the prompt moved down to the "sleep(1);" line, but the cursor is
still on the line above it!
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Zle redisplay bug in pws-24
1999-06-27 9:38 Zle redisplay bug in pws-24 Bart Schaefer
@ 1999-06-27 20:17 ` Geoff Wing
0 siblings, 0 replies; 2+ messages in thread
From: Geoff Wing @ 1999-06-27 20:17 UTC (permalink / raw)
To: zsh-workers
Bart Schaefer <schaefer@candle.brasslantern.com> typed:
[...stuff deleted...]
:and appears to have something to do with killing a line that is exactly
:one character shorter than the width of the terminal.
[...stuff deleted...]
My brain must be malfunctioning for me to have spent ages on the wrong track
after being misled by this.
This is the simple patch. I doubt the super optimised version would be
worth the complexities involved.
*** Src/Zle/zle_refresh.c.org Sun Jun 20 22:36:14 1999
--- Src/Zle/zle_refresh.c Mon Jun 28 06:11:09 1999
***************
*** 495,501 ****
/* if old line and new line are different,
see if we can insert/delete a line to speed up update */
! if (ln < olnct - 1 && !(hasam && vcs == winw) &&
nbuf[ln] && obuf[ln] &&
strncmp(nbuf[ln], obuf[ln], 16)) {
if (tccan(TCDELLINE) && obuf[ln + 1] && obuf[ln + 1][0] &&
--- 495,501 ----
/* if old line and new line are different,
see if we can insert/delete a line to speed up update */
! if (ln > 0 && ln < olnct - 1 && !(hasam && vcs == winw) &&
nbuf[ln] && obuf[ln] &&
strncmp(nbuf[ln], obuf[ln], 16)) {
if (tccan(TCDELLINE) && obuf[ln + 1] && obuf[ln + 1][0] &&
--
Geoff Wing : <gcw@pobox.com> Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org> Ego URL : http://pobox.com/~gcw/
Zsh Stuff : <gcw@zsh.org> Phone : (Australia) 0413 431 874
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-06-27 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-27 9:38 Zle redisplay bug in pws-24 Bart Schaefer
1999-06-27 20:17 ` Geoff Wing
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).