@@ -253,8 +253,13 @@ impl Component for Prompt {
253253 code: KeyCode::Enter,
254254 ..
255255 } => {
256− (self.callback_fn)(cx.editor, &self.line, PromptEvent::Validate);
257− return close_fn;
256+ if self.line.ends_with('/') {
257+ self.completion = (self.completion_fn)(&self.line);
258+ self.exit_selection();
259+ } else {
260+ (self.callback_fn)(cx.editor, &self.line, PromptEvent::Validate);
261+ return close_fn;
262+ }
258263 }
259264 KeyEvent {
260265 code: KeyCode::Tab, ..