Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: muddled completion search status
- X-seq: zsh-workers 35487
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: muddled completion search status
- Date: Tue, 16 Jun 2015 12:29:47 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1434450588; bh=OtHuZQS82WA/7iMlfDZImSw52nsLctbm6GmTNJw0Ovw=; h=From:To:Subject:Date:From:Subject; b=rJGXRscG123fuTVqHg9PAGCtsWf2oMU4pLQsx7FzECoxVXXZJgNhStY12TvdJ7Wc53kTjFJX5ba1nvdGIJunc31c4ldrzOCy/TOlyDqaMlflgzPahr1Mtqrk2OuPugF/BJ07xqUS3lKhCExfrFHqZ8CMDhPcyc/aA//3btbmkOsL5ePXSFWMTjAco8/iXDPvacVj10fzJl1imi0facP9UE/VumVgeixOW9k9hgHCVyDKv4rVE6PLXdgS/SeOI6ObkEWyIgISfnMOg/Rp7FOS0DF710tz8ViGwOyxNU+rOIt0ll5rZKA50r2wz31z9dplL4ldwanhMaA7UU1vGtFK8A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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)) {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author