Handle views of negative height

This fixes an issue where collapsed views did not update the origin
upon focus. Not a perfect fix because it still goes to the top of the list
but good enough to make a new release
This commit is contained in:
Jesse Duffield 2023-07-19 20:37:19 +10:00
parent 9bbfd87371
commit ea5c8b64cf

View File

@ -269,7 +269,7 @@ func (v *View) FocusPoint(cx int, cy int) {
_, height := v.Size()
ly := height - 1
if ly == -1 {
if ly < 0 {
ly = 0
}