mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
fix: error when opening nav view on file with no symbols (#256)
This commit is contained in:
parent
189bf4cce7
commit
30316db63d
1 changed files with 3 additions and 1 deletions
|
@ -335,7 +335,9 @@ M.open = function()
|
||||||
local bufdata = data.get(bufnr)
|
local bufdata = data.get(bufnr)
|
||||||
if bufdata then
|
if bufdata then
|
||||||
local pos = window.get_symbol_position(bufdata, cursor[1], cursor[2], true)
|
local pos = window.get_symbol_position(bufdata, cursor[1], cursor[2], true)
|
||||||
_active_nav:focus_symbol(pos.closest_symbol)
|
if pos.closest_symbol then
|
||||||
|
_active_nav:focus_symbol(pos.closest_symbol)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue