fix: Error on goto_location when code window closed
Mentioned by @gennaro-tedesco in #91
This commit is contained in:
@@ -386,6 +386,11 @@ function Sidebar:__goto_location(change_focus)
|
||||
return
|
||||
end
|
||||
|
||||
if not vim.api.nvim_win_is_valid(self.code.win) then
|
||||
vim.notify("outline.nvim: Code window closed", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_win_set_cursor(self.code.win, { node.line + 1, node.character })
|
||||
|
||||
if cfg.o.outline_window.center_on_jump then
|
||||
|
||||
Reference in New Issue
Block a user