about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_hist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 98f01fbb7..b43e76699 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1179,8 +1179,10 @@ doisearch(char **args, int dir, int pattern)
 		if (patprog) {
 		    revert_patpos = 1;
 		} else {
-		    handlefeep(zlenoargs);
-		    nomatch = 2;
+		    if (nomatch != 2) {
+			handlefeep(zlenoargs);
+			nomatch = 2;
+		    }
 		    /* indicate "invalid" in status line */
 		    memcpy(ibuf, INVALID_TEXT, BAD_TEXT_LEN);
 		    statusline = ibuf;