Skip to content

Commit

Permalink
Invert comparison operators in CellView.Size() (#554)
Browse files Browse the repository at this point in the history
Fixes #553

This function is supposed to return a minimum 2x2 square. However, as the comparison operators are the wrong way around a maximum 2x2 square is returned instead. Inverting the comparison operators fixes the issue.
  • Loading branch information
chrBrd committed Sep 11, 2022
1 parent eef35d4 commit 96bb70f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/cellarea.go
Expand Up @@ -224,10 +224,10 @@ func (a *CellView) Size() (int, int) {
// We always return a minimum of two rows, and two columns.
w, h := a.model.GetBounds()
// Clip to a 2x2 minimum square; we can scroll within that.
if w > 2 {
if w < 2 {
w = 2
}
if h > 2 {
if h < 2 {
h = 2
}
return w, h
Expand Down

0 comments on commit 96bb70f

Please sign in to comment.