zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: muddled completion search status
@ 2015-06-16 10:29 Oliver Kiddle
  2015-06-16 22:35 ` Oliver Kiddle
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Kiddle @ 2015-06-16 10:29 UTC (permalink / raw)
  To: Zsh workers

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)) {


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-17  9:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 10:29 PATCH: muddled completion search status Oliver Kiddle
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

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).