fix(tui): completions should not close on no results (#198)

This commit is contained in:
Carlos Alexandro Becker
2025-07-15 15:00:04 -03:00
committed by GitHub
parent 5336f3df48
commit 833eede1c1

View File

@@ -157,10 +157,6 @@ func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
itemsLen := len(c.list.Items())
c.height = max(min(maxCompletionsHeight, itemsLen), 1)
cmds = append(cmds, c.list.SetSize(c.width, c.height))
if itemsLen == 0 {
// Close completions if no items match the query
cmds = append(cmds, util.CmdHandler(CloseCompletionsMsg{}))
}
return c, tea.Batch(cmds...)
}
return c, nil