Tweaked text box scrolling

This commit is contained in:
Sasha Koshka 2023-01-18 16:01:31 -05:00
parent 89881247d0
commit b69eb6b62e
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ func (element *TextBox) scrollToCursor () {
cursorPosition := element.valueDrawer.PositionOf(element.cursor)
cursorPosition.X -= element.scroll
maxX := bounds.Max.X
minX := bounds.Min.X + bounds.Dx() / 2
minX := maxX
if cursorPosition.X > maxX {
element.scroll += cursorPosition.X - maxX
} else if cursorPosition.X < minX {