Add support for moving to a specific line (#1196)

* Add support for moving to a specific line

* Update documentation
This commit is contained in:
Joe Lim authored and GitHub committed 2023-04-08 23:40:16 +03:00
1 parent 27d316c006
commit b5c83dbf7a
6 files changed
+36 -8

No files matched your search

+13
View File
@@ -1099,6 +1099,19 @@ func (nav *nav) low() bool {
return old != dir.ind
}
func (nav *nav) move(index int) bool {
old := nav.currDir().ind
switch {
case index < old:
return nav.up(old - index)
case index > old:
return nav.down(index - old)
default:
return false
}
}
func (nav *nav) toggleSelection(path string) {
if _, ok := nav.selections[path]; ok {
delete(nav.selections, path)