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

Re: CLEAREOD (Was: Minor refresh problem with completion)



mason@xxxxxxxxxxxxxxx wrote:

> Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> typed:
> :Of course, now that I tried it again, it seems to work (at least if
> :your terminal has the capability of clearing to EOD).
> :
> :But still, Id' be glad if our refresh-code experts could have a look
> :at this, because the code now sets the cursor to the last column of
> :the last prompt line and gives out a TCCLEAREOD -- and doing that when 
> :not in the first column may be undefined on some terminals if I
> :remember correctly.
> 
> Yes, TCCLEAREOD must be done from the first column.  Lots of terminals
> will happily do it from anywhere, but....

The patch in 5971 added a variable `listshown' that should be always
correctly reflect if a list is shown below the prompt. The patch below 
makes the cursor be moved below the prompt (in the first column) and
give out the CLEAREOD there. Since this is only done if there is a
list, this should work without moving up the screen just because the
prompt happens to be in the last line.

Should have thought about that immediatly...

Bye
 Sven

diff -u os/Zle/zle_refresh.c Src/Zle/zle_refresh.c
--- os/Zle/zle_refresh.c	Tue Mar 30 16:00:51 1999
+++ Src/Zle/zle_refresh.c	Wed Mar 31 12:43:31 1999
@@ -262,7 +262,7 @@
 	if (tccan(TCCLEAREOD)) {
 	    int ovln = vln, ovcs = vcs;
 
-	    moveto(nlnct - 1, columns - 1);
+	    moveto(nlnct, 0);
 	    tcout(TCCLEAREOD);
 	    moveto(ovln, ovcs);
 	} else {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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