From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16140 invoked from network); 29 Apr 1999 08:15:06 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Apr 1999 08:15:06 -0000 Received: (qmail 257 invoked by alias); 29 Apr 1999 08:14:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6150 Received: (qmail 250 invoked from network); 29 Apr 1999 08:14:36 -0000 Date: Thu, 29 Apr 1999 10:14:35 +0200 (MET DST) Message-Id: <199904290814.KAA19355@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Wed, 28 Apr 1999 10:43:27 -0700 Subject: Re: 3.1.5-pws-16: alwayslastprompt doesn't always when completing at M-x Bart Schaefer wrote: > Freshly-compiled -pws-16, plus Sven's several patches from this week; setopt > output included for reference, the meat is beyond it. Short descript is, > IF the first time you use completion is for zle commands following ESC-x, > alwayslastprompt seems to be ignored. It kicks in when using completion for > files, and thereafter applies to M-x as well. Ahem. This was because listmatches() now uses complastprompt instead of testint ALWAYSLASTPROMPT directly and I forgot to set that in listlist(). This should fix it. Just for the fun of it I also made a interrupted M-x re-display a list of matches if there were one (`ls zsh' and the list is back again). Good? Bye Sven diff -u os/Zle/zle_misc.c Src/Zle/zle_misc.c --- os/Zle/zle_misc.c Wed Apr 28 16:24:01 1999 +++ Src/Zle/zle_misc.c Thu Apr 29 09:19:49 1999 @@ -611,7 +611,7 @@ executenamedcommand(char *prmt) { Thingy cmd; - int len, l = strlen(prmt); + int len, l = strlen(prmt), ols = listshown; char *ptr; char *okeymap = curkeymapname; @@ -629,6 +629,10 @@ if (!(cmd = getkeycmd()) || cmd == Th(z_sendbreak)) { statusline = NULL; selectkeymap(okeymap, 1); + if ((listshown = ols)) + showinglist = -2; + else + clearlist = 1; return NULL; } if(cmd == Th(z_clearscreen)) { @@ -669,6 +673,10 @@ unrefthingy(r); statusline = NULL; selectkeymap(okeymap, 1); + if ((listshown = ols)) + showinglist = -2; + else + clearlist = 1; return r; } unrefthingy(r); diff -u os/Zle/zle_refresh.c Src/Zle/zle_refresh.c --- os/Zle/zle_refresh.c Wed Apr 28 16:24:01 1999 +++ Src/Zle/zle_refresh.c Thu Apr 29 09:12:30 1999 @@ -271,7 +271,7 @@ clearflag = 0; resetneeded = 1; } - listshown = 0; + listshown = showinglist = 0; } clearlist = 0; diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- os/Zle/zle_tricky.c Wed Apr 28 16:24:02 1999 +++ Src/Zle/zle_tricky.c Thu Apr 29 09:02:01 1999 @@ -7562,10 +7562,12 @@ struct cmgroup dg; Cmgroup am = amatches; int vl = validlist, sm = smatches; + char *oclp = complastprompt; if (listshown) showagain = 1; + complastprompt = ((zmult == 1) == !!isset(ALWAYSLASTPROMPT) ? "yes" : NULL); smatches = 1; validlist = 1; amatches = &dg; @@ -7576,6 +7578,7 @@ amatches = am; validlist = vl; smatches = sm; + complastprompt = oclp; } /* Expand the history references. */ -- Sven Wischnowsky wischnow@informatik.hu-berlin.de