Skip to content

Commit 11d7a71

Browse files
committed
make sure the buffer is still valid before attaching
1 parent 2ccebb3 commit 11d7a71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/lsplinks.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ function M.refresh()
173173
log.error("lsplinks", err)
174174
return
175175
end
176+
if not api.nvim_buf_is_valid(ctx.bufnr) then
177+
return
178+
end
176179
if not links_by_buf[ctx.bufnr] then
177180
api.nvim_buf_attach(ctx.bufnr, false, {
178181
on_detach = function(b)

0 commit comments

Comments
 (0)