mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lsp: fix tagstack for location jump #12248
This commit is contained in:
parent
2c40a38b39
commit
f605eeec65
@ -432,9 +432,9 @@ function M.jump_to_location(location)
|
|||||||
vim.cmd "normal! m'"
|
vim.cmd "normal! m'"
|
||||||
|
|
||||||
-- Push a new item into tagstack
|
-- Push a new item into tagstack
|
||||||
local items = {}
|
local from = {vim.fn.bufnr('%'), vim.fn.line('.'), vim.fn.col('.'), 0}
|
||||||
table.insert(items, {tagname=vim.fn.expand("<cword>"), from=vim.fn.getpos('.')})
|
local items = {{tagname=vim.fn.expand('<cword>'), from=from}}
|
||||||
vim.fn.settagstack(vim.fn.bufnr('%'), {items=items}, 't')
|
vim.fn.settagstack(vim.fn.win_getid(), {items=items}, 't')
|
||||||
|
|
||||||
--- Jump to new location
|
--- Jump to new location
|
||||||
api.nvim_set_current_buf(bufnr)
|
api.nvim_set_current_buf(bufnr)
|
||||||
|
Loading…
Reference in New Issue
Block a user