Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: pws-20 bug >> completion makes partial line vanish



Timothy J Luoma wrote:

> # mv zsh[tab] gives me
> # mv zsh-3.1.5-pws-20
> zsh*                    zsh.export              zsh.mdhi                zshxmods.h 
> zsh-3.1.5-pws-20*       zsh.h                   zsh.mdhs
> zsh-3.1.5-pws-20-NI*    zsh.mdd                 zsh.test*
> zsh-3.1.5-pws-20-m68k*  zsh.mdh                 zshpaths.h
> 
> (now I use my UP ARROW to get a history replacement and get this as a result)
> 
> #mv zsh             -NI /usr/bin
> 
> (notice the big empty space?)

That comes from trying to clear the list on terminals for which zsh
thinks that they can't do TCMULTRIGHT (zsh thinks my xterm can't do
that, hm...).
In the excerpt below, the second moveto() has to move over the old
line contents. But since it thinks, the terminal is not able to do
TCMULTRIGHT, it starts inserting stuff from the new display buffer
(nbuf), which is not yet set up. And because of that, it starts
inserting spaces.
At that place it really should use the old display-buffer contents, so 
the patch just temporarily makes it use that. Not a very nice patch, I 
agree.

Bart, I haven't tried this with pre-3, but I think it may be important 
to have there, too (unless the display code in 3.1.5 has changed more
than I think it has).

Bye
 Sven

--- os/Zle/zle_refresh.c	Tue May 25 09:15:36 1999
+++ Src/Zle/zle_refresh.c	Tue Jun  1 10:28:49 1999
@@ -268,10 +268,13 @@
     if (clearlist && listshown) {
 	if (tccan(TCCLEAREOD)) {
 	    int ovln = vln, ovcs = vcs;
+	    char *nb = nbuf[vln];
 
+	    nbuf[vln] = obuf[vln];
 	    moveto(nlnct, 0);
 	    tcout(TCCLEAREOD);
 	    moveto(ovln, ovcs);
+	    nbuf[vln] = nb;
 	} else {
 	    invalidatelist();
 	    moveto(0, 0);

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author