ruby-changes:67315
From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:30:55 +0900 (JST)
Subject: [ruby-changes:67315] f863ed5210 (master): [ruby/reline] Drop too much contents before processing
https://git.ruby-lang.org/ruby.git/commit/?id=f863ed5210 From f863ed5210084e33545e3b1c620c2b83e2d7a1f8 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Tue, 24 Aug 2021 21:31:04 +0900 Subject: [ruby/reline] Drop too much contents before processing https://github.com/ruby/reline/commit/94f7027edc --- lib/reline/line_editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index ffd5b9c..5976e09 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -541,6 +541,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L541 old_dialog_updown = @dialog_updown if result and not result.empty? @dialog_contents = result + @dialog_contents = @dialog_contents[0...DIALOG_HEIGHT] if @dialog_contents.size > DIALOG_HEIGHT @dialog_contents_width = @dialog_contents.map{ |c| calculate_width(c) } else clear_dialog @@ -577,7 +578,6 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L578 when :up end Reline::IOGate.move_cursor_column(@dialog_column) - @dialog_contents = @dialog_contents[0...DIALOG_HEIGHT] if @dialog_contents.size > DIALOG_HEIGHT @dialog_contents.each_with_index do |item, i| @output.write "\e[46m%-#{DIALOG_WIDTH}s\e[49m" % item.slice(0, DIALOG_WIDTH) Reline::IOGate.move_cursor_column(@dialog_column) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/