diff options
author | aycabta <[email protected]> | 2022-01-05 21:18:59 +0900 |
---|---|---|
committer | git <[email protected]> | 2022-01-16 22:09:28 +0900 |
commit | f94a2adf6a45e93d12c63a9b4ef3e21d9b7e5063 (patch) | |
tree | 8910f3669479aa81be460598e53f26d404cb85aa /lib/reline/line_editor.rb | |
parent | 5ec3450438150e7cb05422c04dc18901161a13ea (diff) |
[ruby/reline] Clear dialog when adding new line to end of buffer
https://github.com/ruby/reline/commit/7d38454327
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |