mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	lsp: fix tagstack for location jump #12248
This commit is contained in:
		@@ -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)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user