ensureScroll on text input frames

This commit is contained in:
Drew DeVault 2019-05-25 15:54:01 -04:00
parent 9947ea125c
commit 1b11a96302
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ func (ti *TextInput) Draw(ctx *Context) {
scroll := ti.scroll scroll := ti.scroll
if !ti.focus { if !ti.focus {
scroll = 0 scroll = 0
} else {
ti.ensureScroll()
} }
ti.ctx = ctx // gross ti.ctx = ctx // gross
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault) ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)