ruby-changes:59295
From: aycabta <ko1@a...>
Date: Tue, 17 Dec 2019 16:47:23 +0900 (JST)
Subject: [ruby-changes:59295] d616926af9 (master): Remove an unnecessary variable
https://git.ruby-lang.org/ruby.git/commit/?id=d616926af9 From d616926af916d140f0bd1be3cdc232193d46286a Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Tue, 17 Dec 2019 14:20:51 +0900 Subject: Remove an unnecessary variable diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 57d4635..42a2b5b 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1198,7 +1198,6 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1198 loop do key = Fiber.yield(search_word) search_again = false - change_direction = false case key when -1 # determined Reline.last_incremental_search = search_word @@ -1210,11 +1209,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1209 search_word = grapheme_clusters.join end when "\C-r".ord, "\C-s".ord - if prev_search_key == key - search_again = true - else - change_direction = true - end + search_again = true if prev_search_key == key prev_search_key = key else multibyte_buf << key -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/