mirror of https://github.com/gdamore/tcell.git
Invert comparison operators in `CellView.Size()` (#554)
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.
This commit is contained in:
parent
eef35d4cfc
commit
96bb70f9ef
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue