diff options
author | Blaž Hrastnik | 2021-07-23 09:10:30 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-07-23 09:10:30 +0000 |
commit | 817a7e0bd68c2430e5dcb7b6c612043329a62231 (patch) | |
tree | 12964d663956dd87eb64e5bf97f1d824666291f5 /helix-term/src | |
parent | 58d08d36ae6a2c6efbf175247bb096fae6629eb1 (diff) |
fix: Only try expanding directory completion if it makes sense
Fixes #487
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 2 |
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 { |