fix(lsp): set buflisted before switching to buffer (#18854)

This commit is contained in:
zeertzjq
2022-06-04 16:23:43 +08:00
committed by GitHub
parent e6fa4cca24
commit 9961a9702e

View File

@@ -1038,8 +1038,8 @@ function M.jump_to_location(location, offset_encoding, reuse_win)
if win then
api.nvim_set_current_win(win)
else
api.nvim_set_current_buf(bufnr)
api.nvim_buf_set_option(bufnr, 'buflisted', true)
api.nvim_set_current_buf(bufnr)
end
local range = location.range or location.targetSelectionRange
local row = range.start.line