mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix(tui): completions: ensure minimum height for completions list
This commit is contained in:
@@ -187,7 +187,7 @@ func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
c.x = c.wWidth - width - 1
|
||||
}
|
||||
c.width = width
|
||||
c.height = max(min(c.height, len(items)), 1) // Ensure at least 1 item height
|
||||
c.height = max(min(maxCompletionsHeight, len(items)), 1) // Ensure at least 1 item height
|
||||
return c, tea.Batch(
|
||||
c.list.SetItems(items),
|
||||
c.list.SetSize(c.width, c.height),
|
||||
|
||||
Reference in New Issue
Block a user