INNER CODE UNIT · Go
y
jpbruinsslot/slack-term · components/channels.go:132
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(
item.ToString(), c.List.ItemFgColor, c.List.ItemBgColor)
}
// Append ellipsis when overflows
cells = termui.DTrimTxCls(cells, c.List.InnerWidth())