Use unpack() rather than manual cursor position unpacking

Co-authored-by: max397574 <81827001+max397574@users.noreply.github.com>
This commit is contained in:
Wil Thomason 2023-10-13 12:58:13 -04:00 committed by GitHub
parent 3cea595b2b
commit b94f9c6509
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,7 +240,7 @@ M.select_symbol = function(item, winid, bufnr, opts)
if opts.jump then
local old_cursor = vim.api.nvim_win_get_cursor(winid)
vim.api.nvim_buf_set_mark(vim.api.nvim_get_current_buf(), [[']], old_cursor[1], old_cursor[2])
vim.api.nvim_buf_set_mark(vim.api.nvim_get_current_buf(), [[']], unpack(old_cursor))
end
vim.api.nvim_win_set_buf(winid, bufnr)