Skip to content

Commit

Permalink
goto definition fix #1318
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Oct 11, 2023
1 parent 79f8072 commit fe094b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/lspsaga/definition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ function def:goto_handler(result, context, args)
if not result or vim.tbl_isempty(result) then
return
end
self.pending_request = false
local res = {}

if type(result[1]) == 'table' then
Expand All @@ -291,6 +292,7 @@ function def:goto_handler(result, context, args)
if not api.nvim_buf_is_loaded(target_bufnr) then
vim.fn.bufload(target_bufnr)
end
vim.bo[target_bufnr].buflisted = true
if args and #args > 0 then
vim.cmd[args[1]]()
end
Expand Down

0 comments on commit fe094b2

Please sign in to comment.