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: Vanishing first character in completion listing
Date: Wed, 4 Oct 2000 15:23:17 +0200 (MET DST)	[thread overview]
Message-ID: <200010041323.PAA10019@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Mon, 2 Oct 2000 14:51:24 +0000


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


                 reply	other threads:[~2000-10-04 13:23 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=200010041323.PAA10019@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).