Skip to content

Commit

Permalink
feat(cellbuf): early return in Screen.render
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Dec 22, 2024
1 parent e9f42af commit d3b059e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cellbuf/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,16 @@ func (s *Screen) Render() {
}

func (s *Screen) render() {
// Do we need to render anything?
if s.opts.AltScreen == s.altScreenMode &&
!s.opts.ShowCursor == s.cursorHidden &&
!s.clear &&
len(s.touch) == 0 &&
len(s.queueAbove) == 0 &&
s.pos == undefinedPos {
return
}

// Do we need alt-screen mode?
if s.opts.AltScreen != s.altScreenMode {
if s.opts.AltScreen {
Expand Down

0 comments on commit d3b059e

Please sign in to comment.