mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 11:18:26 +00:00
fix(picker.actions): fix qflist position (#911)
vim.fn.setqflist() and vim.fn.setloclist() use (1,1)-indexing, but vim.api.nvim_win_set_cursor() uses (1,0)-indexing. Adjust for this when sending items to qflist/loclist.
This commit is contained in:
parent
94bd2eff74
commit
6d3c135235
1 changed files with 2 additions and 2 deletions
|
@ -294,9 +294,9 @@ local function setqflist(items, opts)
|
|||
filename = Snacks.picker.util.path(item),
|
||||
bufnr = item.buf,
|
||||
lnum = item.pos and item.pos[1] or 1,
|
||||
col = item.pos and item.pos[2] or 1,
|
||||
col = item.pos and item.pos[2] + 1 or 1,
|
||||
end_lnum = item.end_pos and item.end_pos[1] or nil,
|
||||
end_col = item.end_pos and item.end_pos[2] or nil,
|
||||
end_col = item.end_pos and item.end_pos[2] + 1 or nil,
|
||||
text = item.line or item.comment or item.label or item.name or item.detail or item.text,
|
||||
pattern = item.search,
|
||||
valid = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue