Skip to content

Commit

Permalink
fix(cellbuf): do not insert above when alternate screen mode is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Dec 5, 2024
1 parent 35e781a commit 5d7933a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cellbuf/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,12 @@ func (s *Screen) Resize(width, height int) bool {
}

// InsertAbove inserts string above the screen. The inserted string is not
// managed by the screen.
// managed by the screen. This does nothing when alternate screen mode is
// enabled.
func (s *Screen) InsertAbove(str string) {
if s.opts.AltScreen {
return
}
s.mu.Lock()
s.queueAbove = append(s.queueAbove, strings.Split(str, "\n")...)
s.mu.Unlock()
Expand Down

0 comments on commit 5d7933a

Please sign in to comment.