From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: muddled completion search status
Date: Tue, 16 Jun 2015 12:29:47 +0200 [thread overview]
Message-ID: <23493.1434450587@thecus.kiddle.eu> (raw)
If a completion match search is active, then cursors/tab etc are used to
select a different match and then searching is restarted, the old status
(wrapped/failed etc) is included in the status line despite the search
string being empty.
There's a further feature where if you press Ctrl-S (or whatever) again,
it will restore the last search string used. This feature is also
triggered if your next key is that for a reverse search. I found this to
be confusing. The following will only restore that last search if you do
the search twice in the same direction.
Oliver
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 2c7ec58..9c5b4ec 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -3271,13 +3271,15 @@ domenuselect(Hookdef dummy, Chdata dat)
}
if (!ins) {
if (was) {
- if (!*msearchstr && lastsearch) {
+ if (!*msearchstr && lastsearch &&
+ back == (mode == MM_BSEARCH)) {
msearchstr = dupstring(lastsearch);
mode = 0;
}
} else {
msearchstr = "";
msearchstack = NULL;
+ msearchstate = MS_OK;
}
} else {
if (cmd == Th(z_selfinsertunmeta)) {
next reply other threads:[~2015-06-16 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 10:29 Oliver Kiddle [this message]
2015-06-16 22:35 ` Oliver Kiddle
2015-06-17 0:15 ` Bart Schaefer
2015-06-17 2:23 ` Greg Klanderman
2015-06-17 9:05 ` Oliver Kiddle
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=23493.1434450587@thecus.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/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).