Skip to content

Commit

Permalink
fix(cellbuf): off by one error in screen resize
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Jan 7, 2025
1 parent 356f65f commit 7531ec9
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 @@ -1308,7 +1308,7 @@ func (s *Screen) Resize(width, height int) bool {

// Clear new columns and lines
if width > oldh {
s.ClearRect(Rect(max(oldw-2, 0), 0, width-oldw, height))
s.ClearRect(Rect(max(oldw-1, 0), 0, width-oldw, height))
} else if width < oldw {
s.ClearRect(Rect(max(width-1, 0), 0, oldw-width, height))
}
Expand Down

0 comments on commit 7531ec9

Please sign in to comment.