diff options
author | Hubert Hirtz <hubert@hirtz.pm> | 2021-10-26 17:27:43 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-10-26 17:27:43 +0200 |
commit | 4cb5734175c5413280178bb2e7c9d6912ba3c799 (patch) | |
tree | 459eb81807cbfedc2a2c22dbde1b8345ca958dfc /ui/buffers.go | |
parent | status bar drawing: fix off-by-one error (diff) |
timeline drawing: fix off-by-one error
Diffstat (limited to '')
-rw-r--r-- | ui/buffers.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/buffers.go b/ui/buffers.go index 06bd7e9..0c24248 100644 --- a/ui/buffers.go +++ b/ui/buffers.go @@ -490,11 +490,7 @@ func (bs *BufferList) DrawHorizontalBufferList(screen tcell.Screen, x0, y0, widt } func (bs *BufferList) DrawTimeline(screen tcell.Screen, x0, y0, nickColWidth int) { - for x := x0; x < x0+bs.tlInnerWidth+nickColWidth+9; x++ { - for y := y0; y < y0+bs.tlHeight; y++ { - screen.SetContent(x, y, ' ', nil, tcell.StyleDefault) - } - } + clearArea(screen, x0, y0, bs.tlInnerWidth+nickColWidth+9, bs.tlHeight) b := &bs.list[bs.current] yi := b.scrollAmt + y0 + bs.tlHeight @@ -536,7 +532,7 @@ func (bs *BufferList) DrawTimeline(screen tcell.Screen, x0, y0, nickColWidth int x = x1 y++ nls = nls[1:] - if bs.tlHeight < y { + if bs.tlHeight <= y { break } } |