fix: add missing cast for opts in render_buffer_async
Problem: LuaLS still warns at opts.refetch access because it does not
track narrowing through opts = opts or {}.
Solution: add ---@cast opts -nil after the guard, matching the same
pattern used in util.render_text.
This commit is contained in:
parent
60aed7d595
commit
6dcd9c0d8f
1 changed files with 1 additions and 0 deletions
|
|
@ -912,6 +912,7 @@ local pending_renders = {}
|
|||
---@param caller_callback nil|fun(err: nil|string)
|
||||
M.render_buffer_async = function(bufnr, opts, caller_callback)
|
||||
opts = opts or {}
|
||||
---@cast opts -nil
|
||||
local function callback(err)
|
||||
if not err then
|
||||
vim.api.nvim_exec_autocmds(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue