Skip to content

Commit

Permalink
fix: renderer: use HomeCursorPosition instead of CursorOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 8, 2024
1 parent 50249d4 commit c78a084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions standard_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (r *standardRenderer) clearScreen() {
defer r.mtx.Unlock()

r.execute(ansi.EraseEntireScreen)
r.execute(ansi.CursorOrigin)
r.execute(ansi.HomeCursorPosition)

r.repaint()
}
Expand Down Expand Up @@ -336,7 +336,7 @@ func (r *standardRenderer) enterAltScreen() {
// Note: we can't use r.clearScreen() here because the mutex is already
// locked.
r.execute(ansi.EraseEntireScreen)
r.execute(ansi.CursorOrigin)
r.execute(ansi.HomeCursorPosition)

// cmd.exe and other terminals keep separate cursor states for the AltScreen
// and the main buffer. We have to explicitly reset the cursor visibility
Expand Down

0 comments on commit c78a084

Please sign in to comment.