From f94a2adf6a45e93d12c63a9b4ef3e21d9b7e5063 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 5 Jan 2022 21:18:59 +0900 Subject: [ruby/reline] Clear dialog when adding new line to end of buffer https://github.com/ruby/reline/commit/7d38454327 --- lib/reline/line_editor.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index dc0dcc6bbc..295af526fe 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -466,6 +466,11 @@ class Reline::LineEditor new_highest_in_this = calculate_height_by_width(prompt_width + calculate_width(@line.nil? ? '' : @line)) rendered = false if @add_newline_to_end_of_buffer + @dialogs.each do |dialog| + clear_each_dialog(dialog) + dialog.contents = nil + dialog.trap_key = nil + end rerender_added_newline(prompt, prompt_width) @add_newline_to_end_of_buffer = false else -- cgit v1.2.3