From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15278 invoked from network); 29 Mar 1999 08:49:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 1999 08:49:26 -0000 Received: (qmail 28980 invoked by alias); 29 Mar 1999 08:49:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5969 Received: (qmail 28973 invoked from network); 29 Mar 1999 08:49:09 -0000 Date: Mon, 29 Mar 1999 10:49:07 +0200 (MET DST) Message-Id: <199903290849.KAA01008@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Fri, 26 Mar 1999 10:08:56 +0100 (MET) Subject: Re: Minor refresh problem with completion I wrote: > Andrej Borsenkow wrote: > > > I have a feeling, that with new completion the complete line is refreshed > > every time. I noted that, as my display flickers sometimes quite ugly. It's > > getting worse, when logical line extends over several terminal lines ... > > Anybody else seen it? > > That's not restricted to the new completion. It's caused by the way > `clearlist' (the variable that triggers clearing a list that may be > beneath the prompt) works -- it forces a redisplay of the prompt. > > I tried to do this in a more sophisticated way (moving the cursor > under the prompt, clear to EOD, move cursor up), but couldn't get it > to work with the rest of the redisplay code. I'm not one of the most > knowledgeable persons with respect to the zle redisplay code, so I > have to ask: can someone come up with a better imlpementation? 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. Bye Sven diff -u oos/Zle/zle_refresh.c Src/Zle/zle_refresh.c --- oos/Zle/zle_refresh.c Mon Mar 29 10:36:48 1999 +++ Src/Zle/zle_refresh.c Mon Mar 29 10:41:47 1999 @@ -254,10 +254,18 @@ return; if (clearlist) { - invalidatelist(); - moveto(0, 0); - clearflag = 0; - resetneeded = 1; + if (tccan(TCCLEAREOD)) { + int ovln = vln, ovcs = vcs; + + moveto(nlnct - 1, columns - 1); + tcout(TCCLEAREOD); + moveto(ovln, ovcs); + } else { + invalidatelist(); + moveto(0, 0); + clearflag = 0; + resetneeded = 1; + } clearlist = 0; } #ifdef HAVE_SELECT -- Sven Wischnowsky wischnow@informatik.hu-berlin.de