aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/aarzilli/nucular/text.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/aarzilli/nucular/text.go')
-rw-r--r--vendor/github.com/aarzilli/nucular/text.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/aarzilli/nucular/text.go b/vendor/github.com/aarzilli/nucular/text.go
index a51a197..994a79a 100644
--- a/vendor/github.com/aarzilli/nucular/text.go
+++ b/vendor/github.com/aarzilli/nucular/text.go
@@ -1378,7 +1378,11 @@ func (ed *TextEditor) doEdit(bounds rect.Rect, style *nstyle.Edit, inp *Input, c
scroll_step := float64(scroll.H) * 0.1
scroll_inc := float64(scroll.H) * 0.01
scroll_target := float64(d.TextSize.Y + row_height)
- ed.Scrollbar.Y = int(doScrollbarv(ed.win, scroll, bounds, scroll_offset, scroll_target, scroll_step, scroll_inc, &style.Scrollbar, inp, font))
+ newy := int(doScrollbarv(ed.win, scroll, bounds, scroll_offset, scroll_target, scroll_step, scroll_inc, &style.Scrollbar, inp, font))
+ if newy != ed.Scrollbar.Y {
+ ed.win.ctx.trashFrame = true
+ }
+ ed.Scrollbar.Y = newy
}
return ret