on master help sign in
fix: Only try expanding directory completion if it makes sense

Fixes #487

commit817a7e0bd68c2430e5dcb7b6c612043329a62231 authorBlaž Hrastnik <blaz@mxxn.io> dateFri 23 Jul 2021, 18:10 (5 years ago) parent58d08d3
1 file changed+1−1
helix-term/src/ui/prompt.rs+1−1
helix-term/src/ui/prompt.rs+1−1
@@ -463,7 +463,7 @@ impl Component for Prompt {
463463 code: KeyCode::Enter,
464464 ..
465465 } => {
466− if self.line.ends_with('/') {
466+ if self.selection.is_some() && self.line.ends_with('/') {
467467 self.completion = (self.completion_fn)(&self.line);
468468 self.exit_selection();
469469 } else {