From 1e775e003b396f6af7f8ca5f11c026162d457029 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 4 Jun 2024 14:53:37 +0200 Subject: [PATCH] avoid returning empty completion when aborting to not have it inline complete directories --- ext/REPLExt/completions.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/REPLExt/completions.jl b/ext/REPLExt/completions.jl index 7d4a11e653..f4a471909a 100644 --- a/ext/REPLExt/completions.jl +++ b/ext/REPLExt/completions.jl @@ -88,9 +88,9 @@ function complete_remote_package(partial; hint::Bool) if is_julia_compat === nothing || is_julia_compat push!(cmp, name) # In hint mode the result is only used if there is a single matching entry - # so we can return no matches in case of more than one match + # so we abort the search if hint && found_match - return String[] + return sort!(collect(cmp)) end found_match = true break