fix: don't try to set alt screen when already in desired mode

This commit is contained in:
Christian Muehlhaeuser 2022-10-06 12:38:15 +02:00
parent ca8b21a3e2
commit f406999cba
1 changed files with 8 additions and 0 deletions

View File

@ -260,6 +260,10 @@ func (r *standardRenderer) altScreen() bool {
}
func (r *standardRenderer) enterAltScreen() {
if r.altScreenActive {
return
}
r.mtx.Lock()
defer r.mtx.Unlock()
@ -279,6 +283,10 @@ func (r *standardRenderer) enterAltScreen() {
}
func (r *standardRenderer) exitAltScreen() {
if !r.altScreenActive {
return
}
r.mtx.Lock()
defer r.mtx.Unlock()