From 238d523113131321a28afa83e22ba6696a3b74d9 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sun, 23 Aug 2020 04:29:19 -0500 Subject: [PATCH] Fix another 15276 case --- src/REPLMode/completions.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/REPLMode/completions.jl b/src/REPLMode/completions.jl index b0dc5d9936..032a75f851 100644 --- a/src/REPLMode/completions.jl +++ b/src/REPLMode/completions.jl @@ -32,8 +32,11 @@ function complete_local_dir(s, i1, i2) end cmp = REPL.REPLCompletions.complete_path(s, i2) + cmp2 = cmp[2] completions = [REPL.REPLCompletions.completion_text(p) for p in cmp[1]] - completions = filter!(x -> isdir(s[1:prevind(s, first(cmp[2])-i1+1)]*x), completions) + completions = let s=s + filter!(x -> isdir(s[1:prevind(s, first(cmp2)-i1+1)]*x), completions) + end if expanded_user if length(completions) == 1 && endswith(joinpath(homedir(), ""), first(completions)) completions = [joinpath(s, "")]