From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20842 invoked from network); 4 Oct 2000 13:23:37 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Oct 2000 13:23:37 -0000 Received: (qmail 871 invoked by alias); 4 Oct 2000 13:23:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12884 Received: (qmail 863 invoked from network); 4 Oct 2000 13:23:19 -0000 Date: Wed, 4 Oct 2000 15:23:17 +0200 (MET DST) Message-Id: <200010041323.PAA10019@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Mon, 2 Oct 2000 14:51:24 +0000 Subject: PATCH: Re: Vanishing first character in completion listing 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