From e49af4d5bf050beb3871e6164689b97d33154a56 Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Mon, 13 Feb 2017 14:16:36 +1100 Subject: [PATCH] bind input area to block coordinates --- widgets/input.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widgets/input.go b/widgets/input.go index 510abe9..eed8535 100644 --- a/widgets/input.go +++ b/widgets/input.go @@ -42,10 +42,11 @@ func (i *Input) Buffer() ui.Buffer { var cell ui.Cell buf := i.Block.Buffer() - x := i.padding[0] + x := i.Block.X + i.padding[0] + y := i.Block.Y + 1 for _, ch := range i.Data { cell = ui.Cell{Ch: ch, Fg: i.TextFgColor, Bg: i.TextBgColor} - buf.Set(x, 1, cell) + buf.Set(x, y, cell) x++ }