Skip to content

Commit

Permalink
fix(cellbuf): partial clear shouldn't happen on first render
Browse files Browse the repository at this point in the history
This removes unnecessary clearing of the screen on the first render
when the screen is not in inline mode.
  • Loading branch information
aymanbagabas committed Feb 7, 2025
1 parent ab21d71 commit 40534c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cellbuf/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ func (s *Screen) render() {

// Force clear?
// We only do partial clear if the screen is not in alternate screen mode
partialClear := !s.opts.AltScreen &&
partialClear := !s.opts.AltScreen && s.cur.X != -1 && s.cur.Y != -1 &&
s.curbuf.Width() == s.newbuf.Width() &&
s.curbuf.Height() > s.newbuf.Height()

Expand Down

0 comments on commit 40534c3

Please sign in to comment.