summaryrefslogtreecommitdiffstats
path: root/contrib/libreadline/isearch.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2007-11-07 04:34:03 +0000
committerache <ache@FreeBSD.org>2007-11-07 04:34:03 +0000
commit0aedaa860df7bc4c0789b1dc5b70733290da0367 (patch)
treef5cb0e516b57ee618c23a683d5d3f4fb2818a0d6 /contrib/libreadline/isearch.c
parent0248be3adabadb1c2affdd61f665e5d6299438e1 (diff)
downloadFreeBSD-src-0aedaa860df7bc4c0789b1dc5b70733290da0367.zip
FreeBSD-src-0aedaa860df7bc4c0789b1dc5b70733290da0367.tar.gz
Official patches 3-7
Diffstat (limited to 'contrib/libreadline/isearch.c')
-rw-r--r--contrib/libreadline/isearch.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/libreadline/isearch.c b/contrib/libreadline/isearch.c
index 9f67bfc..2ed459f 100644
--- a/contrib/libreadline/isearch.c
+++ b/contrib/libreadline/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;
OpenPOWER on IntegriCloud