about summary refs log tree commit diff
path: root/Src/Zle/complist.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2015-06-18 23:55:45 +0200
committerOliver Kiddle <opk@zsh.org>2015-06-19 00:01:42 +0200
commit0a0ba5e6641a8a78d745928e5738c95cc5353ee0 (patch)
tree3eb03306f095516cb14c93d1ad192f0c65eba1ba /Src/Zle/complist.c
parentdeb2ec7f174df720033e7001be0c8d8f0bd9a9d9 (diff)
downloadzsh-0a0ba5e6641a8a78d745928e5738c95cc5353ee0.tar.gz
zsh-0a0ba5e6641a8a78d745928e5738c95cc5353ee0.tar.xz
zsh-0a0ba5e6641a8a78d745928e5738c95cc5353ee0.zip
35487, 35496: don't reinstate previous incremental search string
when search direction changes
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r--Src/Zle/complist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index a02a5c37b..39c0c314d 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -3287,13 +3287,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;
                     }
                 }
                 if (cmd == Th(z_selfinsertunmeta)) {