mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix(tui): completions should not close on no results (#198)
This commit is contained in:
committed by
GitHub
parent
5336f3df48
commit
833eede1c1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user