mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
fix: better error message for refetch_symbols (#328)
This commit is contained in:
parent
712802e731
commit
88764566f9
1 changed files with 6 additions and 1 deletions
|
@ -318,7 +318,12 @@ M.refetch_symbols = function(bufnr)
|
|||
do_setup()
|
||||
local backends = require("aerial.backends")
|
||||
if not backends.attach(bufnr, true) then
|
||||
backends.get(bufnr).fetch_symbols(bufnr)
|
||||
local backend = backends.get(bufnr)
|
||||
if backend then
|
||||
backend.fetch_symbols(bufnr)
|
||||
else
|
||||
error("No aerial backend for buffer")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue