File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/tui/internal/components/dialog Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ func (c *completionDialogComponent) Init() tea.Cmd {
6767func (c * completionDialogComponent ) getAllCompletions (query string ) tea.Cmd {
6868 return func () tea.Msg {
6969 allItems := make ([]completions.CompletionSuggestion , 0 )
70+ providersWithResults := 0
7071
7172 // Collect results from all providers
7273 for _ , provider := range c .providers {
@@ -81,11 +82,14 @@ func (c *completionDialogComponent) getAllCompletions(query string) tea.Cmd {
8182 )
8283 continue
8384 }
84- allItems = append (allItems , items ... )
85+ if len (items ) > 0 {
86+ providersWithResults ++
87+ allItems = append (allItems , items ... )
88+ }
8589 }
8690
8791 // If there's a query, use fuzzy ranking to sort results
88- if query != "" && len ( allItems ) > 0 && len ( c . providers ) > 1 {
92+ if query != "" && providersWithResults > 1 {
8993 t := theme .CurrentTheme ()
9094 baseStyle := styles .NewStyle ().Background (t .BackgroundElement ())
9195 // Create a slice of display values for fuzzy matching
You can’t perform that action at this time.
0 commit comments