summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-26 20:53:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-26 20:53:04 +0000
commit1fc8484f05abd32b3d4009f2ab1f95e4d95c6b78 (patch)
tree8073bdc0901d338d7a321e382bd9c840bd405767
parent49d05f747679dfbb0df43426aee01d906e0db769 (diff)
downloadzsh-1fc8484f05abd32b3d4009f2ab1f95e4d95c6b78.tar.gz
zsh-1fc8484f05abd32b3d4009f2ab1f95e4d95c6b78.zip
24881: only feep once on an invalid pattern
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_hist.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 36320774b..8070213f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-04-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
+ * 24881: Src/Zle/zle_hist.c: we kept feeping on an invalid
+ pattern; once is quite enough.
+
* 24880: Src/Zle/zle_hist.c: feeping on a failed match could
be mistimed.
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;