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

Use Symbol of signal for trap

This commit is contained in:
aycabta 2021-07-31 21:39:04 +09:00
parent 1f2b3f2529
commit 5bb7b57129
Notes: git 2021-08-04 18:30:14 +09:00

View file

@ -150,7 +150,7 @@ class Reline::LineEditor
@screen_size = Reline::IOGate.get_screen_size
@screen_height = @screen_size.first
reset_variables(prompt, encoding: encoding)
@old_trap = Signal.trap('SIGINT') {
@old_trap = Signal.trap(:INT) {
if @scroll_partial_screen
move_cursor_down(@screen_height - (@line_index - @scroll_partial_screen) - 1)
else