@@ -107,7 +107,6 @@ func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
107 switch msg := msg.(type) {
107 switch msg := msg.(type) {
108 case tea.WindowSizeMsg:
108 case tea.WindowSizeMsg:
109 c.wWidth = msg.Width
109 c.wWidth = msg.Width
110− c.width = min(listWidth(c.list.Items()), maxCompletionsWidth)
111 c.height = min(msg.Height-c.y, 15)
110 c.height = min(msg.Height-c.y, 15)
112 return c, nil
111 return c, nil
113 case tea.KeyPressMsg:
112 case tea.KeyPressMsg:
@@ -180,7 +179,7 @@ func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
180 if c.x+width >= c.wWidth {
179 if c.x+width >= c.wWidth {
181 c.x = c.wWidth - width - 1
180 c.x = c.wWidth - width - 1
183− c.width = max(width, c.wWidth-minCompletionsWidth-1)
182+ c.width = width
184 c.height = max(min(c.height, len(items)), 1) // Ensure at least 1 item height
183 c.height = max(min(c.height, len(items)), 1) // Ensure at least 1 item height
185 return c, tea.Batch(
184 return c, tea.Batch(
186 c.list.SetItems(items),
185 c.list.SetItems(items),