From c8125bb53192cb6d6493005056af90c5fc9a19fc Mon Sep 17 00:00:00 2001 From: Ye Date: Mon, 19 Nov 2018 13:02:26 -0800 Subject: [PATCH] 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. --- bin/autojump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autojump b/bin/autojump index ed0151d..878b0de 100755 --- a/bin/autojump +++ b/bin/autojump @@ -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: