commit f5d9283342634babd6024337e23dcb130ed8b3ba
parent 8d025c1047bd313b4b09d9f7b328c9ae42ed0151
Author: Mark Alexander <marka@pobox.com>
Date: Fri, 17 May 2013 12:38:41 -0400
Fix #52: Fix search-for-next function when using Ruby 1.9
The use of the 'n' key to search for the next occurrence
of a string stopped working when running sup in Ruby 1.9.
This simple patch fixes that problem.
Signed-off-by: Gaute Hope
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
@@ -267,7 +267,7 @@ EOS
def handle_input c
if @focus_buf
- if @focus_buf.mode.in_search? && c != CONTINUE_IN_BUFFER_SEARCH_KEY[0]
+ if @focus_buf.mode.in_search? && c != CONTINUE_IN_BUFFER_SEARCH_KEY.ord
@focus_buf.mode.cancel_search!
@focus_buf.mark_dirty
end