on main help sign in
fix(ui): prevent nil pointer in completions size update (#2162)
722093bkslamph
internal/ui/completions/completions.go+3
@@ -182,6 +182,9 @@ func (c *Completions) updateSize() {
182 width := 0
182 width := 0
183 for i := start; i <= end; i++ {
183 for i := start; i <= end; i++ {
184 item := c.list.ItemAt(i)
184 item := c.list.ItemAt(i)
185+ if item == nil {
186+ continue
187+ }
185 s := item.(interface{ Text() string }).Text()
188 s := item.(interface{ Text() string }).Text()
186 width = max(width, ansi.StringWidth(s))
189 width = max(width, ansi.StringWidth(s))
187 }
190 }