zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: Vanishing first character in completion listing
@ 2000-10-04 13:23 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-10-04 13:23 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-10-04 13:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-04 13:23 PATCH: Re: Vanishing first character in completion listing Sven Wischnowsky

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).