summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-08-28 02:37:30 +0900
committeraycabta <aycabta@gmail.com>2021-08-29 20:30:33 +0900
commitb023ef85947530e256f12c8a7809d79a5639414d (patch)
tree5d9328a5a82fe92d4b0c2917c9e8e0f90b7f6de7 /lib
parentd41d41da382bd76fc99f62ed12ddd2c8e688b0e0 (diff)
[ruby/reline] Clear dialog by C-c
https://github.com/ruby/reline/commit/f66a079c85
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index e81cd23f2a..b5a5af30f3 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -151,6 +151,7 @@ class Reline::LineEditor
@screen_height = @screen_size.first
reset_variables(prompt, encoding: encoding)
@old_trap = Signal.trap(:INT) {
+ clear_dialog
if @scroll_partial_screen
move_cursor_down(@screen_height - (@line_index - @scroll_partial_screen) - 1)
else