Bugfix: Movement on empty tables could lead to infinite loops. Fixes #705, resolves #706

This commit is contained in:
Oliver 2022-03-07 23:21:20 +01:00
parent 96063d6082
commit 9994674d60
1 changed files with 3 additions and 0 deletions

View File

@ -1329,6 +1329,9 @@ func (t *Table) InputHandler() func(event *tcell.EventKey, setFocus func(p Primi
previouslySelectedRow, previouslySelectedColumn := t.selectedRow, t.selectedColumn
lastColumn := t.content.GetColumnCount() - 1
rowCount := t.content.GetRowCount()
if rowCount == 0 {
return // No movement on empty tables.
}
var (
previous = func() {
startRow := t.selectedRow