Skip to content

Commit

Permalink
term: ensure cursor is hidden before closing
Browse files Browse the repository at this point in the history
When running a terminal in a dialog that is closed before the terminal
has had a chance of being redrawn, the cursor may be left visible.

Make sure to hide the cursor in the close routine.

Signed-off-by: Robin Jarry <[email protected]>
Tested-by: Bence Ferdinandy <[email protected]>
Tested-by: Jason Cox <[email protected]>
  • Loading branch information
rjarry committed Nov 24, 2023
1 parent 91b26ad commit eda71c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func (term *Terminal) closeErr(err error) {
// Stop receiving events
term.vterm.Detach()
term.vterm.Close()
if term.ctx != nil {
term.ctx.HideCursor()
}
}
if term.OnClose != nil {
term.OnClose(err)
Expand Down

0 comments on commit eda71c5

Please sign in to comment.