summaryrefslogtreecommitdiff
path: root/lib/reline/line_editor.rb
diff options
context:
space:
mode:
authoraycabta <[email protected]>2022-01-04 14:21:46 +0900
committergit <[email protected]>2022-01-11 06:10:37 +0900
commit9e79ae539b6c939af6c3bc1a008a019fb920fe64 (patch)
treeadf3679d1f824031b13e9a5a0c5649676cdd5e12 /lib/reline/line_editor.rb
parent930ebdd7ca4dfb9386fcaa52909dadb970163f8e (diff)
[ruby/reline] Clear dialog when just_move_cursor is called with dialog at last line
https://github.com/ruby/reline/commit/05024b968e
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r--lib/reline/line_editor.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 90cc4b2db2..dc0dcc6bbc 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -470,8 +470,12 @@ class Reline::LineEditor
@add_newline_to_end_of_buffer = false
else
if @just_cursor_moving and not @rerender_all
+ @dialogs.each do |dialog|
+ clear_each_dialog(dialog)
+ dialog.contents = nil
+ dialog.trap_key = nil
+ end
rendered = just_move_cursor
- render_dialog((prompt_width + @cursor) % @screen_size.last)
@just_cursor_moving = false
return
elsif @previous_line_index or new_highest_in_this != @highest_in_this