INNER CODE UNIT · Go
func
jpbruinsslot/slack-term · components/channels.go:127
func (c *Channels) Buffer() termui.Buffer {
buf := c.List.Buffer()
for i, item := range c.ChannelItems[c.Offset:] {
y := c.List.InnerBounds().Min.Y + i
if y > c.List.InnerBounds().Max.Y-1 {
break
}
// Set the visible cursor
var cells []termui.Cell
if y == c.CursorPosition {
cells = termui.DefaultTxBuilder.Build(
item.ToString(), c.List.ItemBgColor, c.List.ItemFgColor)
} else {
cells = termui.DefaultTxBuilder.Build(