From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: 3.1.5-pws-16: alwayslastprompt doesn't always when completing at M-x
Date: Thu, 29 Apr 1999 10:14:35 +0200 (MET DST) [thread overview]
Message-ID: <199904290814.KAA19355@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Wed, 28 Apr 1999 10:43:27 -0700
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<TAB><M-x><C-g>'
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
next reply other threads:[~1999-04-29 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-29 8:14 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-04-28 17:43 Bart Schaefer
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=199904290814.KAA19355@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).