Permalink
Browse files

Fix crash when performing reverse look search.

Closes GH-6
  • Loading branch information...
1 parent f11cc7a commit b218364494959faf1a707978399a52273c6e8412 @luislavena luislavena committed Sep 15, 2009
Showing with 5 additions and 4 deletions.
  1. +1 −0 CHANGES
  2. +4 −4 lib/rbreadline.rb
View
@@ -3,5 +3,6 @@
* Bugfixes:
* Accept 'cygwin' as valid terminal [rogerdpack]
* Accept 'dumb' as valid terminal. Closes GH-7
+ * Fix crash when performing reverse look search. Closes GH-6
=== 0.1.2 / 2009-05-18
View
@@ -3932,8 +3932,8 @@ def _rl_isearch_dispatch(cxt, c)
f = nil
# Translate the keys we do something with to opcodes.
- if (c && _rl_keymap[c])
- f = _rl_keymap[c]
+ if (c && @_rl_keymap[c])
+ f = @_rl_keymap[c]
if (f == :rl_reverse_search_history)
cxt.lastc = (cxt.sflags & SF_REVERSE)!=0 ? -1 : -2
elsif (f == :rl_forward_search_history)
@@ -4171,7 +4171,7 @@ def _rl_isearch_fini(cxt)
rl_restore_prompt()
# Save the search string for possible later use.
- @last_isearch_string = @cxt.search_string
+ @last_isearch_string = cxt.search_string
@last_isearch_string_len = cxt.search_string_index
cxt.search_string = nil
@@ -7217,7 +7217,7 @@ def rl_display_search(search_string, reverse_p, where)
rl_message(message)
message = nil
- send(rl_redisplay_function)
+ send(@rl_redisplay_function)
end
# Transpose the characters at point. If point is at the end of the line,

0 comments on commit b218364

Please sign in to comment.