Skip to content

Commit

Permalink
Fixes #64: fix crash when pressing Ctrl-r Ctrl-r
Browse files Browse the repository at this point in the history
Under Ruby 1.9, pressing Ctrl-r or any of the other special search keys
while already performing an interactive search would raise an exeption.

Tested-by: Mark Somerville <mark@scottishclimbs.com> [F17, MRI 1.9.3/1.8.7]
Signed-off-by: Mark Somerville <mark@scottishclimbs.com>
  • Loading branch information
Spakman committed Jul 11, 2012
1 parent f3d615f commit 0f2cc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rbreadline.rb
Expand Up @@ -3973,7 +3973,7 @@ def _rl_isearch_dispatch(cxt, c)
# variable isearch-terminators) are used to terminate the search but
# not subsequently execute the character as a command. The default
# value is "\033\012" (ESC and C-J).
if (cxt.search_terminators.include?(cxt.lastc))
if (cxt.search_terminators.include?(cxt.lastc.to_s))
# ESC still terminates the search, but if there is pending
#input or if input arrives within 0.1 seconds (on systems
#with select(2)) it is used as a prefix character
Expand Down

0 comments on commit 0f2cc13

Please sign in to comment.