dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Reviews Compare Notes Search Review guide fix(cmdline.popupmenu): add forward declaration for on_hide callback 64f7392772d11a7595ae181a03eb1e5024236d8a
Oliver Jan Krylow <oliver@bugabinga.net > · 15 Apr 2026
unsigned
Browse files Compare with HEAD
Same upvalue capture bug as viewer.lua - on_show() calls on_hide() but
on_hide was defined later in the file. Lua's local function syntax
captures nil at definition time instead of using late binding.
Changed files (1) neovim/lua/bugabinga/cmdline/popupmenu.lua Modified +3 / −1 text lines
21 23 local function kind_icon (kind)
22 24 if not kind
or kind
== '' then 273 - local function on_hide ()
275 + on_hide = function ()
274 276 if vim.api.nvim_win_is_valid(state.window)
then 275 277 vim.api.nvim_win_hide(state.window)