diff --git a/list.go b/list.go index dd42110..e97a65b 100644 --- a/list.go +++ b/list.go @@ -424,9 +424,7 @@ func (l *List) Draw(screen tcell.Screen) { // Background color of selected text. if index == l.currentItem && (!l.selectedFocusOnly || l.HasFocus()) { - - // Width of background color of selected item. - var textWidth int = width + textWidth := width if !l.highlightFullLine { if w := StringWidth(item.MainText); w < textWidth { textWidth = w diff --git a/table.go b/table.go index fb9e162..2e411ea 100644 --- a/table.go +++ b/table.go @@ -368,6 +368,7 @@ func (t *Table) Select(row, column int) *Table { // Fixed rows and columns are never skipped. func (t *Table) SetOffset(row, column int) *Table { t.rowOffset, t.columnOffset = row, column + t.trackEnd = false return t }