Summary #
src/cursed/completion_menu.lua:_tick calls self:close() twice consecutively when build_ctx returns nil.
The Problem #
Line 395-396: self:close() is called twice in the nil ctx early-return branch. The second call is redundant and may cause unexpected side effects (e.g., on_close callback invoked twice, double removal of transient handler).
Impact #
- correctness: Double close on every keystroke when view or buffer is not loaded causes log noise and potential double free in on_close callbacks.
Recommended Fix #
Remove the duplicated self:close() call on line 396.
References #
aa1bae98..335f21a5