diff options
author | dylan <dylan.araps@gmail.com> | 2021-06-11 08:15:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-11 08:15:53 +0000 |
commit | 82aa107dadae8235ce30791f00f12ac0c46b731c (patch) | |
tree | a0d5771a6a4d6a4d636b25c86503362a9270eafd | |
parent | 5045c4ab91f559a3735619dacf604e37632160cf (diff) | |
parent | 944c7dc6879d5ef4a1696cbbe3ac5a6f2030cc0e (diff) |
Merge pull request #174 from arsiarola/previous_index-fix
Fix marked_files out of bounds
-rwxr-xr-x | fff | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -196,12 +196,12 @@ read_dir() { for item in "$PWD"/*; do if [[ -d $item ]]; then dirs+=("$item") - ((item_index++)) # Find the position of the child directory in the # parent directory list. [[ $item == "$OLDPWD" ]] && ((previous_index=item_index)) + ((item_index++)) else files+=("$item") fi @@ -313,7 +313,7 @@ draw_dir() { # When going up the directory tree, place the cursor on the position # of the previous directory. ((find_previous == 1)) && { - ((scroll_start=previous_index-1)) + ((scroll_start=previous_index)) ((scroll=scroll_start)) # Clear the directory history. We're here now. |