summaryrefslogtreecommitdiff
path: root/lib/readline/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline/search.c')
-rw-r--r--lib/readline/search.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/readline/search.c b/lib/readline/search.c
index 99b9c8d3..028c2505 100644
--- a/lib/readline/search.c
+++ b/lib/readline/search.c
@@ -172,7 +172,8 @@ noninc_dosearch (string, dir)
oldpos = where_history ();
history_set_pos (noninc_history_pos);
- entry = current_history ();
+ entry = current_history (); /* will never be NULL after successful search */
+
#if defined (VI_MODE)
if (rl_editing_mode != vi_mode)
#endif
@@ -477,7 +478,7 @@ rl_history_search_internal (count, dir)
rl_history_search_pos = ret;
oldpos = where_history ();
history_set_pos (rl_history_search_pos);
- temp = current_history ();
+ temp = current_history (); /* will never be NULL after successful search */
history_set_pos (oldpos);
/* Don't find multiple instances of the same line. */