ruby-changes:67307
From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:30:44 +0900 (JST)
Subject: [ruby-changes:67307] ff43b0f2dd (master): [ruby/reline] Update dialog backup before clearing
https://git.ruby-lang.org/ruby.git/commit/?id=ff43b0f2dd From ff43b0f2ddce0b30071be83383e5d178141b2247 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Wed, 25 Aug 2021 17:22:23 +0900 Subject: [ruby/reline] Update dialog backup before clearing https://github.com/ruby/reline/commit/a39e2c8813 --- lib/reline/line_editor.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 0966c19..40667d3 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -544,6 +544,13 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L544 @dialog_contents = @dialog_contents[0...DIALOG_HEIGHT] if @dialog_contents.size > DIALOG_HEIGHT @dialog_contents_width = @dialog_contents.map{ |c| calculate_width(c) } else + @dialog_lines_backup = { + lines: modify_lines(whole_lines), + line_index: @line_index, + first_line_started_from: @first_line_started_from, + started_from: @started_from, + byte_pointer: @byte_pointer + } clear_dialog @dialog_contents = nil return -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/