summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Milde <daniel@milde.cz>2022-12-27 10:44:44 +0100
committerDaniel Milde <daniel@milde.cz>2022-12-27 10:56:06 +0100
commit058a14dc5371caf1a415256a33cb284f586c5243 (patch)
tree3a75bb33bfc2831c486f81e1cb1adbf5a00df745
parent894b2544228fcf19a85573e13512528b31d50236 (diff)
feat: move cursor to next row when markedv5.21.0
-rw-r--r--tui/marked.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tui/marked.go b/tui/marked.go
index 123af50..3c350ee 100644
--- a/tui/marked.go
+++ b/tui/marked.go
@@ -17,7 +17,8 @@ func (ui *UI) fileItemMarked(row int) {
ui.markedRows[row] = struct{}{}
}
ui.showDir()
- ui.table.Select(row, 0)
+ // select next row if possible
+ ui.table.Select(min(row+1, ui.table.GetRowCount()-1), 0)
}
func (ui *UI) deleteMarked(shouldEmpty bool) {