Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion stdlib/REPL/src/TerminalMenus/AbstractMenu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,14 @@ function request(term::REPL.Terminals.TTYTerminal, m::AbstractMenu; cursor::Unio
finally # always disable raw mode
if raw_mode_enabled
!suppress_output && print(term.out_stream, "\x1b[?25h") # unhide cursor
REPL.Terminals.raw!(term, false)
try
# raw! calls check_open which can throw
REPL.Terminals.raw!(term, false)
catch err
if err !== Base.IOError("stream is closed or unusable", 0)
rethrow()
end
end
end
end
!suppress_output && println(term.out_stream)
Expand Down