From f605eeec65a3f4923e02f97fcef713365cd2e588 Mon Sep 17 00:00:00 2001 From: Gabriel Sanches Date: Tue, 5 May 2020 00:12:35 -0300 Subject: lsp: fix tagstack for location jump #12248 --- runtime/lua/vim/lsp/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/lua') 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(""), 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(''), from=from}} + vim.fn.settagstack(vim.fn.win_getid(), {items=items}, 't') --- Jump to new location api.nvim_set_current_buf(bufnr) -- cgit