Skip to content

Commit

Permalink
fix(cellbuf): clear screen below cursor on first render in inline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Feb 9, 2025
1 parent ac53671 commit add6d45
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cellbuf/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1277,10 +1277,16 @@ func (s *Screen) render() {

var nonEmpty int

firstRender := s.cur.X == -1 && s.cur.Y == -1
if firstRender && !s.opts.AltScreen {
s.clearBelow(nil, 0)
}

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

if s.clear {
Expand Down

0 comments on commit add6d45

Please sign in to comment.