From 9961a9702e75d80e6d37637182f361320e690002 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 4 Jun 2022 16:23:43 +0800 Subject: fix(lsp): set buflisted before switching to buffer (#18854) --- runtime/lua/vim/lsp/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 63e9342b1a..b041385c9c 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -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 -- cgit