mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(buffers): use "
mark for full buffer position when set. Closes #1160
This commit is contained in:
parent
d23fd69fa1
commit
7d350bc0c7
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ function M.buffers(opts, ctx)
|
|||
name = "[No Name]" .. (vim.bo[buf].filetype ~= "" and " " .. vim.bo[buf].filetype or "")
|
||||
end
|
||||
local info = vim.fn.getbufinfo(buf)[1]
|
||||
local mark = vim.api.nvim_buf_get_mark(buf, '"')
|
||||
local flags = {
|
||||
buf == current_buf and "%" or (buf == alternate_buf and "#" or ""),
|
||||
info.hidden == 1 and "h" or "a",
|
||||
|
@ -37,7 +38,7 @@ function M.buffers(opts, ctx)
|
|||
text = buf .. " " .. name,
|
||||
file = name,
|
||||
info = info,
|
||||
pos = { info.lnum, 0 },
|
||||
pos = mark[1] ~= 0 and mark or { info.lnum, 0 },
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue