fix issue with 'SIGINT' handling in LineEditor#reset
@old_trap is the string "DEFAULT" and not a callable object (Proc) if there are no other signal handlers for SIGINT signal to chain.
This commit is contained in:
parent
47b04557b0
commit
3163a07878
@ -67,7 +67,7 @@ class Reline::LineEditor
|
|||||||
@old_trap = Signal.trap('SIGINT') {
|
@old_trap = Signal.trap('SIGINT') {
|
||||||
scroll_down(@highest_in_all - @first_line_started_from)
|
scroll_down(@highest_in_all - @first_line_started_from)
|
||||||
Reline::IOGate.move_cursor_column(0)
|
Reline::IOGate.move_cursor_column(0)
|
||||||
@old_trap.()
|
@old_trap.call if @old_trap.respond_to?(:call) # can also be string, ex: "DEFAULT"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user