Skip to content

Commit

Permalink
fix: don't try to set alt screen when already in desired mode
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Oct 6, 2022
1 parent ca8b21a commit 2970a93
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions standard_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ func (r *standardRenderer) altScreen() bool {
}

func (r *standardRenderer) enterAltScreen() {
if r.altScreenActive {
return
}

r.mtx.Lock()
defer r.mtx.Unlock()

Expand All @@ -279,6 +283,10 @@ func (r *standardRenderer) enterAltScreen() {
}

func (r *standardRenderer) exitAltScreen() {
if !r.altScreenActive {
return
}

r.mtx.Lock()
defer r.mtx.Unlock()

Expand Down

0 comments on commit 2970a93

Please sign in to comment.