From 6f1e19c6fe42b79ba989f62db1e5631dd9d6e008 Mon Sep 17 00:00:00 2001 From: Anders Brander Date: Mon, 29 Mar 2021 13:30:37 +0200 Subject: [PATCH] Allow cursor-left to move to previous line in table view, if at leftmost cell. --- table.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/table.go b/table.go index 8395140..ca274e8 100644 --- a/table.go +++ b/table.go @@ -1156,7 +1156,12 @@ func (t *Table) InputHandler() func(event *tcell.EventKey, setFocus func(p Primi if t.columnsSelectable { t.selectedColumn-- if t.selectedColumn < 0 { - t.selectedColumn = 0 + t.selectedColumn = t.lastColumn + t.selectedRow-- + if t.selectedRow < 0 { + t.selectedRow = 0 + t.selectedColumn = 0 + } } previous() } else {