zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: Clearing the completion listing
Date: Tue, 16 Mar 1999 13:27:57 +0100 (MET)	[thread overview]
Message-ID: <199903161227.NAA25797@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sun, 14 Mar 1999 12:25:49 -0800


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


                 reply	other threads:[~1999-03-17  8:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199903161227.NAA25797@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).