* 3.1.5-pws-16: alwayslastprompt doesn't always when completing at M-x
@ 1999-04-28 17:43 Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-04-28 17:43 UTC (permalink / raw)
To: zsh-workers
This is really strange.
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.
At one point while fooling with this I typed control-L and got
BUG: listmatches called with bogus list
but I haven't been able to make that happen again. It may result after
attempting a M-x completion that doesn't produce any matches at all.
This is entirely old-style completion, BTW.
--- 8< --- snip --- 8< ---
zagzig<1> setopt
allexport off
noalwayslastprompt off
alwaystoend on
noappendhistory off
autocd on
noautolist off
noautomenu off
autonamedirs off
noautoparamkeys off
noautoparamslash off
autopushd off
noautoremoveslash off
autoresume on
nobadpattern off
nobanghist off
nobareglobqual off
bashautolist off
nobeep off
nobgnice on
braceccl off
bsdecho off
cdablevars off
chaselinks off
noclobber on
completealiases off
completeinword on
correct on
correctall off
cshjunkiehistory off
cshjunkieloops off
cshjunkiequotes off
cshnullglob on
noequals off
errexit off
noexec off
extendedglob off
extendedhistory off
noflowcontrol off
nofunctionargzero off
noglob off
globalrcsfirst off
globassign off
globcomplete off
globdots off
globsubst off
nohashcmds off
nohashdirs off
nohashlistall off
histallowclobber off
nohistbeep off
histignoredups on
histignorespace off
histnofunctions off
histnostore off
histreduceblanks off
histverify off
nohup on
ignorebraces off
ignoreeof off
interactive on
interactivecomments off
ksharrays off
kshautoload off
kshglob off
kshoptionprint on
nolistambiguous off
nolistbeep off
nolisttypes off
localoptions off
login off
longlistjobs off
magicequalsubst off
mailwarning off
markdirs off
menucomplete off
monitor on
nomultios off
nonomatch off
nonotify off
nullglob off
numericglobsort off
overstrike off
pathdirs on
posixbuiltins off
printeightbit off
printexitvalue off
privileged off
promptbang off
nopromptcr off
nopromptpercent off
promptsubst off
pushdignoredups off
pushdminus off
pushdsilent on
pushdtohome off
rcexpandparam off
rcquotes off
norcs off
recexact off
restricted off
rmstarsilent off
rmstarwait off
shfileexpansion off
shglob off
shinstdin on
shoptionletters off
noshortloops off
shwordsplit off
singlecommand off
singlelinezle off
sunkeyboardhack on
nounset off
verbose off
xtrace off
zle on
zagzig<2> <-- ESC-x
execute: de_ <-- de<TAB>
delete-char delete-word
delete-char-or-list describe-key-briefly
zagzig<2> <-- (new prompt is printed?!?)
execute: de_ <-- C-g (execute: is erased)
zagzig<2> ls <-- ls <TAB> (no new prompt)
Doc/ config.cache configure.dynamic zsh*
Etc/ config.h configure.static zsh-3.1.5*
Makefile config.log stamp-h
Src/ config.status* stamp-h.in
zagzig<2> ls <-- ESC-x (still no new prompt)
execute: de_ <-- de<TAB> (no new prompt!?!)
delete-char delete-word
delete-char-or-list describe-key-briefly
--- 8< --- snip --- 8< ---
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 3.1.5-pws-16: alwayslastprompt doesn't always when completing at M-x
@ 1999-04-29 8:14 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-04-29 8:14 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-04-29 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-28 17:43 3.1.5-pws-16: alwayslastprompt doesn't always when completing at M-x Bart Schaefer
1999-04-29 8:14 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).