From 817a7e0bd68c2430e5dcb7b6c612043329a62231 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 23 Jul 2021 18:10:30 +0900 Subject: fix: Only try expanding directory completion if it makes sense Fixes #487 --- helix-term/src/ui/prompt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index a4cb26f7..2df1e281 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -463,7 +463,7 @@ impl Component for Prompt { code: KeyCode::Enter, .. } => { - if self.line.ends_with('/') { + if self.selection.is_some() && self.line.ends_with('/') { self.completion = (self.completion_fn)(&self.line); self.exit_selection(); } else { -- cgit v1.2.3-70-g09d2