preview.nvim/lua
Barrett Ruth e53ddcad9a
fix(compiler): hoist obj declaration before vim.system closure
Problem: lua-language-server flagged obj as an undefined global in
both vim.schedule_wrap callbacks because local obj = vim.system(...)
puts the variable out of scope inside the closure at declaration time.
At runtime the guard active[bufnr].obj == obj evaluated obj as nil,
so the clear was always skipped and the process remained tracked
indefinitely.

Solution: split into local obj / obj = vim.system(...) so the
upvalue is in scope when the closure is defined.
2026-03-03 18:02:04 -05:00
..
preview fix(compiler): hoist obj declaration before vim.system closure 2026-03-03 18:02:04 -05:00