mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
feat(picker): added live support to git_log, which uses -S (pickaxe) to search. Closes #1544
This commit is contained in:
parent
924a9304e9
commit
c9fa6f7b07
2 changed files with 5 additions and 0 deletions
|
|
@ -283,6 +283,7 @@ M.git_log = {
|
||||||
format = "git_log",
|
format = "git_log",
|
||||||
preview = "git_show",
|
preview = "git_show",
|
||||||
confirm = "git_checkout",
|
confirm = "git_checkout",
|
||||||
|
supports_live = true,
|
||||||
sort = { fields = { "score:desc", "idx" } },
|
sort = { fields = { "score:desc", "idx" } },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,10 @@ function M.log(opts, ctx)
|
||||||
args[#args + 1] = file
|
args[#args + 1] = file
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ctx.filter.search ~= "" then
|
||||||
|
vim.list_extend(args, { "-S", ctx.filter.search })
|
||||||
|
end
|
||||||
|
|
||||||
local Proc = require("snacks.picker.source.proc")
|
local Proc = require("snacks.picker.source.proc")
|
||||||
file = file and svim.fs.normalize(file) or nil
|
file = file and svim.fs.normalize(file) or nil
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue