Skip to content

Commit

Permalink
fix: invalid buffer error (#38)
Browse files Browse the repository at this point in the history
Not sure exactly the cause, but it seems like we're getting a LSP
symbols callback after the buffer has been deleted.
  • Loading branch information
stevearc committed Dec 31, 2021
1 parent e2a5baf commit 81f002f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/aerial/backends/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ M.get = function(bufnr)
end

M.set_symbols = function(bufnr, items)
if not bufnr or bufnr == 0 then
bufnr = vim.api.nvim_get_current_buf()
end
if not vim.api.nvim_buf_is_valid(bufnr) then
return
end
local data = require("aerial.data")
local fold = require("aerial.fold")
local loading = require("aerial.loading")
Expand Down

0 comments on commit 81f002f

Please sign in to comment.