From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28088 invoked from network); 17 Mar 1999 08:50:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Mar 1999 08:50:44 -0000 Received: (qmail 16886 invoked by alias); 17 Mar 1999 08:48:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5829 Received: (qmail 10411 invoked from network); 17 Mar 1999 08:33:09 -0000 Date: Tue, 16 Mar 1999 13:27:57 +0100 (MET) Message-Id: <199903161227.NAA25797@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Sun, 14 Mar 1999 12:25:49 -0800 Subject: PATCH: Re: Clearing the completion listing Bart Schaefer wrote: > Seems to me there are a few more zle commands that ought to clear the > completion listing. The one that I notice most often is kill-whole-line. > Most history motions should do it, too, since if any of them pull up a > multi-line entry it's just going to cover up the list anyway (assuming > always_last_prompt). And kill-buffer, and probably transpose-words, and > maybe insert-last-word. Any others? The patch makes the list be removed for those functions I mentioned in message 5802. I decided agains using a `ZLE_'-flag because in most cases the list should only be removed if the widget does something and that is easy to achieve in the widget-functions themselves. Also, due to the helper functions used, there aren't so many places to put the `clearlist = 1' at. Bye Sven diff -u os/Zle/zle_hist.c Src/Zle/zle_hist.c --- os/Zle/zle_hist.c Tue Mar 16 11:50:18 1999 +++ Src/Zle/zle_hist.c Tue Mar 16 13:18:01 1999 @@ -498,6 +498,7 @@ histline = ev; setline(t); setlastline(); + clearlist = 1; return 1; } @@ -515,6 +516,7 @@ stackcs = cs; *line = '\0'; ll = cs = 0; + clearlist = 1; } /**/ @@ -537,9 +539,9 @@ cs += ics; } pushline(); - if (!isfirstln) { + if (!isfirstln) errflag = done = 1; - } + clearlist = 1; } /**/ @@ -571,6 +573,7 @@ memcpy((char *)line + cs, s, cc); cs += cc; free(s); + clearlist = 1; } } diff -u os/Zle/zle_misc.c Src/Zle/zle_misc.c --- os/Zle/zle_misc.c Tue Mar 16 11:50:18 1999 +++ Src/Zle/zle_misc.c Tue Mar 16 13:12:10 1999 @@ -135,6 +135,7 @@ { cs = 0; forekill(ll, 0); + clearlist = 1; } /**/ @@ -157,6 +158,7 @@ cs--, i++; } forekill(i, 1); + clearlist = 1; } /**/ @@ -288,6 +290,7 @@ cs++, i++; } backkill(i, 0); + clearlist = 1; } /**/ diff -u os/Zle/zle_vi.c Src/Zle/zle_vi.c --- os/Zle/zle_vi.c Tue Mar 16 11:50:19 1999 +++ Src/Zle/zle_vi.c Tue Mar 16 13:17:48 1999 @@ -535,6 +535,7 @@ spaceinline(1); line[cs++] = '\n'; startvitext(1); + clearlist = 1; } /**/ @@ -545,6 +546,7 @@ spaceinline(1); line[cs] = '\n'; startvitext(1); + clearlist = 1; } /**/ -- Sven Wischnowsky wischnow@informatik.hu-berlin.de