diff options
author | Daniel Milde <daniel@milde.cz> | 2022-12-27 10:44:44 +0100 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2022-12-27 10:56:06 +0100 |
commit | 058a14dc5371caf1a415256a33cb284f586c5243 (patch) | |
tree | 3a75bb33bfc2831c486f81e1cb1adbf5a00df745 | |
parent | 894b2544228fcf19a85573e13512528b31d50236 (diff) |
feat: move cursor to next row when markedv5.21.0
-rw-r--r-- | tui/marked.go | 3 |
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) { |