Skip to content

Commit

Permalink
fix(cellbuf): exit altscreen before showing cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Dec 12, 2024
1 parent 8cdb185 commit ad4b7ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cellbuf/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,16 +1102,16 @@ func (s *Screen) Close() (err error) {
s.move(b, 0, s.newbuf.Height()-1)
s.clearToEnd(b, nil, true)

if s.cursorHidden {
b.WriteString(ansi.ShowCursor)
s.cursorHidden = false
}

if s.altScreenMode {
b.WriteString(ansi.ResetAltScreenSaveCursorMode)
s.altScreenMode = false
}

if s.cursorHidden {
b.WriteString(ansi.ShowCursor)
s.cursorHidden = false
}

// Write the buffer
_, err = s.w.Write(b.Bytes())
if err != nil {
Expand Down

0 comments on commit ad4b7ae

Please sign in to comment.