[前][次][番号順一覧][スレッド一覧]

ruby-changes:58262

From: aycabta <ko1@a...>
Date: Wed, 16 Oct 2019 02:56:55 +0900 (JST)
Subject: [ruby-changes:58262] 259601ab57 (master): Support backspace in incremental search

https://git.ruby-lang.org/ruby.git/commit/?id=259601ab57

From 259601ab578885418b36138e457c2a93dd281896 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Wed, 16 Oct 2019 02:55:45 +0900
Subject: Support backspace in incremental search


diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 4bf280f..9223e55 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -1223,7 +1223,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1223
         @cursor = @byte_pointer = 0
       else
         chr = key.is_a?(String) ? key : key.chr(Encoding::ASCII_8BIT)
-        if chr.match?(/[[:print:]]/)
+        if chr.match?(/[[:print:]]/) or key == "\C-h".ord or key == 127
           searcher.resume(key)
         else
           if @history_pointer
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]