@@ -463,7 +463,7 @@ impl Component for Prompt {
463 code: KeyCode::Enter,
463 code: KeyCode::Enter,
466− if self.line.ends_with('/') {
466+ if self.selection.is_some() && self.line.ends_with('/') {
467 self.completion = (self.completion_fn)(&self.line);
467 self.completion = (self.completion_fn)(&self.line);
468 self.exit_selection();
468 self.exit_selection();