aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorfrancisco souza <108725+fsouza@users.noreply.github.com>2021-05-01 13:28:21 -0400
committerGitHub <noreply@github.com>2021-05-01 19:28:21 +0200
commit993ca90c9b53033216d4973e2f995b995ed5740e (patch)
tree3c6baf82e3daa80b628c039e733f7a840c93e62d /runtime/lua/vim/lsp/util.lua
parentef81999f4ef45a12fbd8900aff92465f6acc7c25 (diff)
downloadrneovim-993ca90c9b53033216d4973e2f995b995ed5740e.tar.gz
rneovim-993ca90c9b53033216d4973e2f995b995ed5740e.tar.bz2
rneovim-993ca90c9b53033216d4973e2f995b995ed5740e.zip
lsp: fix regression in jump_to_location() (#14446)
This fixes a regression that was introduced in [1] by accidentally leaving out a line. 1: https://github.com/neovim/neovim/pull/12262
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 92ec447b55..ce8468aa8a 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -944,6 +944,9 @@ function M.jump_to_location(location)
local from = {from_bufnr, vim.fn.line('.'), vim.fn.col('.'), 0}
local item = {tagname=vim.fn.expand('<cword>'), from=from}
+ -- Save position in jumplist
+ vim.cmd("mark '")
+
--- Jump to new location (adjusting for UTF-16 encoding of characters)
local bufnr = vim.uri_to_bufnr(uri)
api.nvim_set_current_buf(bufnr)