1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Clear dialog by C-c

https://github.com/ruby/reline/commit/f66a079c85
This commit is contained in:
aycabta 2021-08-28 02:37:30 +09:00
parent d41d41da38
commit b023ef8594

View file

@ -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