mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.lines): use original buf instead of current (which can be the picker on refresh)
This commit is contained in:
parent
c5060a801c
commit
7ccf9c9d69
1 changed files with 2 additions and 2 deletions
|
@ -2,8 +2,8 @@ local M = {}
|
|||
|
||||
---@param opts snacks.picker.lines.Config
|
||||
---@type snacks.picker.finder
|
||||
function M.lines(opts)
|
||||
local buf = opts.buf or 0
|
||||
function M.lines(opts, ctx)
|
||||
local buf = opts.buf or ctx.filter.current_buf
|
||||
buf = buf == 0 and vim.api.nvim_get_current_buf() or buf
|
||||
local extmarks = require("snacks.picker.util.highlight").get_highlights({ buf = buf, extmarks = true })
|
||||
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue