Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Clearing the completion listing
- X-seq: zsh-workers 5829
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: Clearing the completion listing
- Date: Tue, 16 Mar 1999 13:27:57 +0100 (MET)
- In-reply-to: "Bart Schaefer"'s message of Sun, 14 Mar 1999 12:25:49 -0800
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author