mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker): resume. Closes #709
This commit is contained in:
parent
2568f18c4d
commit
9b55a907bd
2 changed files with 4 additions and 1 deletions
|
@ -331,6 +331,7 @@ function M.resume()
|
|||
last.opts.pattern = last.filter.pattern
|
||||
last.opts.search = last.filter.search
|
||||
local ret = M.new(last.opts)
|
||||
ret:show()
|
||||
ret.list:set_selected(last.selected)
|
||||
ret.list:update()
|
||||
ret.input:update()
|
||||
|
@ -478,6 +479,8 @@ function M:close()
|
|||
M.last.selected = self:selected({ fallback = false })
|
||||
M.last.cursor = self.list.cursor
|
||||
M.last.topline = self.list.top
|
||||
M.last.opts = M.last.opts or {}
|
||||
M.last.opts.live = self.opts.live
|
||||
Snacks.picker.current = nil
|
||||
local current = vim.api.nvim_get_current_win()
|
||||
local is_picker_win = vim.tbl_contains({ self.input.win.win, self.list.win.win, self.preview.win.win }, current)
|
||||
|
|
|
@ -110,7 +110,7 @@ function M.grep(opts, ctx)
|
|||
return require("snacks.picker.source.proc").proc({
|
||||
opts,
|
||||
{
|
||||
notify = not opts.live,
|
||||
notify = false, -- never notify on grep errors, since it's impossible to know if the error is due to the search pattern
|
||||
cmd = cmd,
|
||||
args = args,
|
||||
---@param item snacks.picker.finder.Item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue