Unnamed repository; edit this file 'description' to name the repository.
fix: Only try expanding directory completion if it makes sense
Fixes #487
Blaž Hrastnik 2021-07-23
parent 58d08d3 · commit 817a7e0
-rw-r--r--helix-term/src/ui/prompt.rs2
1 files changed, 1 insertions, 1 deletions
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 {