mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
bind input area to block coordinates
This commit is contained in:
parent
493307b06d
commit
e49af4d5bf
@ -42,10 +42,11 @@ func (i *Input) Buffer() ui.Buffer {
|
|||||||
var cell ui.Cell
|
var cell ui.Cell
|
||||||
buf := i.Block.Buffer()
|
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 {
|
for _, ch := range i.Data {
|
||||||
cell = ui.Cell{Ch: ch, Fg: i.TextFgColor, Bg: i.TextBgColor}
|
cell = ui.Cell{Ch: ch, Fg: i.TextFgColor, Bg: i.TextBgColor}
|
||||||
buf.Set(x, 1, cell)
|
buf.Set(x, y, cell)
|
||||||
x++
|
x++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user