Skip to content

Commit

Permalink
[ruby/reline] Always call finalize and deprep
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng authored and hsbt committed Apr 5, 2024
1 parent cebbe18 commit 4cbe4e4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/reline.rb
Expand Up @@ -358,19 +358,10 @@ def readline(prompt = '', add_hist = false)
io_gate.move_cursor_column(0)
rescue Errno::EIO
# Maybe the I/O has been closed.
rescue StandardError => e
ensure
line_editor.finalize
io_gate.deprep(otio)
raise e
rescue Exception
# Including Interrupt
line_editor.finalize
io_gate.deprep(otio)
raise
end

line_editor.finalize
io_gate.deprep(otio)
end

# GNU Readline waits for "keyseq-timeout" milliseconds to see if the ESC
Expand Down

0 comments on commit 4cbe4e4

Please sign in to comment.