Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Vanishing first character in completion listing
- X-seq: zsh-workers 12884
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: Vanishing first character in completion listing
- Date: Wed, 4 Oct 2000 15:23:17 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Mon, 2 Oct 2000 14:51:24 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> Ths is odd. I was using accept-and-menu-complete to add file names to the
> command line, and when the line wrapped (thus causing the listing to be
> redraw one line farther down) the `B' in `Builtins' vanished.
What irritates me is that it did redraw the list one line farther
down. It didn't do that for me. But maybe that's caused by different
style and option settings.
Anyway, I could reproduce the vanishing-character thing -- not
directly after the wrap-around but one a-a-m-c after it. It looks like
some display bug for me, maybe it is starting to list when some
variable setting says that there isn't a list to display (are because
it thinks the list is already displayed).
But since after menu completion was started my shell didn't think that
there was a list below the prompt any more, this was confused
anyway. In fact it cleared showinglist (which means that it actively
`dis-remembered' that there is a list) and later used listshown to
check if it needed to (re-)display a list when starting menu
completion. Asymmetrically, somehow. The patch makes it remember the
value for showinglist when going into menu completion (or when
re-using an old list of matches). That fix avoids the
character-vanishing, too.
Bye
Sven
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.38
diff -u -r1.38 compcore.c
--- Src/Zle/compcore.c 2000/08/11 12:19:35 1.38
+++ Src/Zle/compcore.c 2000/10/04 13:14:26
@@ -282,7 +282,7 @@
int
do_completion(Hookdef dummy, Compldat dat)
{
- int ret = 0, lst = dat->lst, incmd = dat->incmd;
+ int ret = 0, lst = dat->lst, incmd = dat->incmd, osl = showinglist;
char *s = dat->s;
char *opm;
LinkNode n;
@@ -412,6 +412,9 @@
if (nmatches > 1 && diffmatches) {
/* There is more than one match. */
ret = do_ambiguous();
+
+ if (!showinglist && uselist && listshown && (usemenu == 2 || oldlist))
+ showinglist = osl;
} else if (nmatches == 1 || (nmatches > 1 && !diffmatches)) {
/* Only one match. */
Cmgroup m = amatches;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author