From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: Minor bug in ALWAYS_LAST_PROMPT
Date: Sun, 9 Feb 1997 23:26:31 -0800 [thread overview]
Message-ID: <970209232631.ZM8676@candle.brasslantern.com> (raw)
Actually, the bug is when it's *unset*.
If unset, key functions that list completions try to return to the
last prompt if given a numeric argument. If set, these functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
try to return to the last prompt if given no numeric argument.
Given a numeric argument of 1, the listing functions behave as if they
were not given any argument at all. You have to give a numeric argument
of 0 or 2,3,... to get the documented behavior.
Simple patch follows.
--- zsh-3.0.3-test4/Src/zle_main.c Fri Jan 31 21:24:08 1997
+++ zsh-3.0.3-test4-work/Src/zle_main.c Sun Feb 9 23:22:07 1997
@@ -1110,8 +1110,8 @@
return;
trashzle();
clearflag = (isset(USEZLE) && termok &&
- (isset(ALWAYSLASTPROMPT) && zmult == 1)) ||
- (unset(ALWAYSLASTPROMPT) && zmult != 1);
+ (isset(ALWAYSLASTPROMPT) && !gotmult)) ||
+ (unset(ALWAYSLASTPROMPT) && gotmult);
printbind(keybuf, (len = strlen(keybuf)) ? len : 1, 0);
fprintf(shout, " is ");
if (cmd == z_sendstring) {
@@ -1157,8 +1157,8 @@
funcfound = 0;
trashzle();
clearflag = (isset(USEZLE) && termok &&
- (isset(ALWAYSLASTPROMPT) && zmult == 1)) ||
- (unset(ALWAYSLASTPROMPT) && zmult != 1);
+ (isset(ALWAYSLASTPROMPT) && !gotmult)) ||
+ (unset(ALWAYSLASTPROMPT) && gotmult);
if (func == z_selfinsert || func == z_undefinedkey)
fprintf(shout, "%s is on many keys", zlecmds[func].name);
else {
--- zsh-3.0.3-test4/Src/zle_tricky.c Fri Jan 31 21:24:09 1997
+++ zsh-3.0.3-test4-work/Src/zle_tricky.c Sun Feb 9 23:22:38 1997
@@ -2144,8 +2144,8 @@
trashzle();
clearflag = (isset(USEZLE) && termok &&
- (isset(ALWAYSLASTPROMPT) && zmult == 1)) ||
- (unset(ALWAYSLASTPROMPT) && zmult != 1);
+ (isset(ALWAYSLASTPROMPT) && !gotmult)) ||
+ (unset(ALWAYSLASTPROMPT) && gotmult);
up = printfmt(expl, nmatches, 1);
@@ -3516,8 +3516,8 @@
showinglist = 0;
clearflag = (isset(USEZLE) && termok &&
- (isset(ALWAYSLASTPROMPT) && zmult == 1)) ||
- (unset(ALWAYSLASTPROMPT) && zmult != 1);
+ (isset(ALWAYSLASTPROMPT) && !gotmult)) ||
+ (unset(ALWAYSLASTPROMPT) && gotmult);
arr = amatches;
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
reply other threads:[~1997-02-10 7:29 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=970209232631.ZM8676@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=schaefer@nbn.com \
--cc=zsh-workers@math.gatech.edu \
/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).