Skip to content

Commit

Permalink
lightbulb check buffer is valid close #1280
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Sep 7, 2023
1 parent 3519a20 commit c9b17bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lspsaga/codeaction/lightbulb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ local function update(buf)
timer:start(config.lightbulb.debounce, 0, function()
timer:stop()
vim.schedule(function()
render(buf)
if api.nvim_buf_is_valid(buf) and api.nvim_get_current_buf() == buf then
render(buf)
end
end)
end)
end
Expand Down

0 comments on commit c9b17bc

Please sign in to comment.