summaryrefslogtreecommitdiff
path: root/isearch.c
diff options
context:
space:
mode:
Diffstat (limited to 'isearch.c')
-rw-r--r--isearch.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/isearch.c b/isearch.c
index 9f67bfc..2ed459f 100644
--- a/isearch.c
+++ b/isearch.c
@@ -327,8 +327,15 @@ _rl_isearch_dispatch (cxt, c)
rl_command_func_t *f;
f = (rl_command_func_t *)NULL;
-
- /* Translate the keys we do something with to opcodes. */
+
+ if (c < 0)
+ {
+ cxt->sflags |= SF_FAILED;
+ cxt->history_pos = cxt->last_found_line;
+ return -1;
+ }
+
+ /* Translate the keys we do something with to opcodes. */
if (c >= 0 && _rl_keymap[c].type == ISFUNC)
{
f = _rl_keymap[c].function;