aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorGabriel Sanches <gabriel@gsr.dev>2020-05-05 00:12:35 -0300
committerGitHub <noreply@github.com>2020-05-04 20:12:35 -0700
commitf605eeec65a3f4923e02f97fcef713365cd2e588 (patch)
tree9e57dd6d14baf270b65860cc8c500a949543c489 /runtime/lua/vim/lsp/util.lua
parent2c40a38b39a944a3e1a90302c1061b4e6e3ba6ac (diff)
downloadrneovim-f605eeec65a3f4923e02f97fcef713365cd2e588.tar.gz
rneovim-f605eeec65a3f4923e02f97fcef713365cd2e588.tar.bz2
rneovim-f605eeec65a3f4923e02f97fcef713365cd2e588.zip
lsp: fix tagstack for location jump #12248
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 6a1e799489..494eebf9ea 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -432,9 +432,9 @@ function M.jump_to_location(location)
vim.cmd "normal! m'"
-- Push a new item into tagstack
- local items = {}
- table.insert(items, {tagname=vim.fn.expand("<cword>"), from=vim.fn.getpos('.')})
- vim.fn.settagstack(vim.fn.bufnr('%'), {items=items}, 't')
+ local from = {vim.fn.bufnr('%'), vim.fn.line('.'), vim.fn.col('.'), 0}
+ local items = {{tagname=vim.fn.expand('<cword>'), from=from}}
+ vim.fn.settagstack(vim.fn.win_getid(), {items=items}, 't')
--- Jump to new location
api.nvim_set_current_buf(bufnr)