on main help sign in
fix(ui): completions: simplify Close method
commit0c8cd47548296e9eaed766d8569411f9d3193f1f authorAyman Bagabas <ayman.bagabas@gmail.com> dateThu 8 Jan 2026, 10:51 (9 months ago) parent6c05739
1 file changed+3−3
internal/ui/completions/completions.go+3−3
internal/ui/completions/completions.go+3−3
@@ -126,9 +126,8 @@ func (c *Completions) SetFiles(files []string) {
126126}
127127
128128// Close closes the completions popup.
129−func (c *Completions) Close() tea.Msg {
129+func (c *Completions) Close() {
130130 c.open = false
131− return ClosedMsg{}
132131}
133132
134133// Filter filters the completions with the given query.
@@ -188,7 +187,8 @@ func (c *Completions) Update(msg tea.KeyPressMsg) (tea.Msg, bool) {
188187 return c.selectCurrent(false), true
189188
190189 case key.Matches(msg, c.keyMap.Cancel):
191− return c.Close(), true
190+ c.Close()
191+ return ClosedMsg{}, true
192192 }
193193
194194 return nil, false