mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.marks): fix buffer checking (#2287)
This buffer number index is 1.
This commit is contained in:
parent
a0df15ebcd
commit
ca0858a30a
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ function M.marks(opts)
|
|||
local file = mark.file or bufname
|
||||
local buf = mark.pos[1] and mark.pos[1] > 0 and mark.pos[1] or nil
|
||||
local line ---@type string?
|
||||
if buf and mark.pos[2] > 0 and vim.api.nvim_buf_is_valid(mark.pos[2]) then
|
||||
if buf and mark.pos[2] > 0 and vim.api.nvim_buf_is_valid(mark.pos[1]) then
|
||||
line = vim.api.nvim_buf_get_lines(buf, mark.pos[2] - 1, mark.pos[2], false)[1]
|
||||
end
|
||||
local label = mark.mark:sub(2, 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue