on master help sign in
Auto-complete directory members (#1801) (#1907)
567ddefRoland Kovacs
helix-term/src/ui/prompt.rs+5
@@ -526,6 +526,11 @@ impl Component for Prompt {
526 }
526 }
527 key!(Tab) => {
527 key!(Tab) => {
528 self.change_completion_selection(CompletionDirection::Forward);
528 self.change_completion_selection(CompletionDirection::Forward);
529+ // if single completion candidate is a directory list content in completion
530+ if self.completion.len() == 1 && self.line.ends_with(std::path::MAIN_SEPARATOR) {
531+ self.recalculate_completion(cx.editor);
532+ self.exit_selection();
533+ }
529 (self.callback_fn)(cx, &self.line, PromptEvent::Update)
534 (self.callback_fn)(cx, &self.line, PromptEvent::Update)
530 }
535 }
531 shift!(Tab) => {
536 shift!(Tab) => {