SetOffset() also turns off end-tracking in Table. Fixes #238

pull/254/head
Oliver 5 years ago
parent c16128c927
commit 03d744dee3

@ -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

@ -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
}

Loading…
Cancel
Save