Unverified Commit c8125bb5 authored by Ye's avatar Ye Committed by GitHub
Browse files

Fix inconsisent file indexing in find_matches

When user applies tab completion and gets the list of possible paths to jump to, those paths contains the deleted/invalid ones. 
However, in the next stage, when the user selects an path index to jump to, autojump filters out the invalid paths and causes inconsistent indexing.

This PR applies a simple fix to keep the invalid paths during the index-based jump. This way, user will go to the exact path s/he sees in the terminal.
1 merge request!550Fix inconsisent file indexing in find_matches
Showing with 1 addition and 1 deletion
+1 -1
......@@ -325,7 +325,7 @@ def main(args): # noqa
print_local(
get_ith_path(
tab_index,
find_matches(entries, [tab_needle]),
find_matches(entries, [tab_needle], check_entries=False),
),
)
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment