diff options
Diffstat (limited to '')
| -rw-r--r-- | ui/buffers.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/buffers.go b/ui/buffers.go index bec770e..07f91a8 100644 --- a/ui/buffers.go +++ b/ui/buffers.go @@ -206,7 +206,7 @@ type buffer struct { isAtTop bool } -func (b *buffer) DrawLines(screen tcell.Screen, width int, height int) { +func (b *buffer) DrawLines(screen tcell.Screen, width, height, nickColWidth int) { st := tcell.StyleDefault for x := 0; x < width; x++ { for y := 0; y < height; y++ { @@ -214,8 +214,6 @@ func (b *buffer) DrawLines(screen tcell.Screen, width int, height int) { } } - nickColWidth := 16 - y0 := b.scrollAmt + height for i := len(b.lines) - 1; 0 <= i; i-- { if y0 < 0 { @@ -472,8 +470,8 @@ func (bs *bufferList) idx(title string) int { return -1 } -func (bs *bufferList) Draw(screen tcell.Screen) { - bs.list[bs.current].DrawLines(screen, bs.width, bs.height-3) +func (bs *bufferList) Draw(screen tcell.Screen, nickColWidth int) { + bs.list[bs.current].DrawLines(screen, bs.width, bs.height-3, nickColWidth) bs.drawStatusBar(screen, bs.height-3) bs.drawTitleList(screen, bs.height-1) } |
