fix: add opts.bufnr and opts.winnr to builtin picker (#1706)
This commit is contained in:
@@ -101,8 +101,8 @@ local get_current_buf_line = function(winnr)
|
||||
end
|
||||
|
||||
git.bcommits = function(opts)
|
||||
opts.current_line = (opts.current_file == nil) and get_current_buf_line(0) or nil
|
||||
opts.current_file = vim.F.if_nil(opts.current_file, vim.fn.expand "%:p")
|
||||
opts.current_line = (opts.current_file == nil) and get_current_buf_line(opts.winnr) or nil
|
||||
opts.current_file = vim.F.if_nil(opts.current_file, vim.api.nvim_buf_get_name(opts.bufnr))
|
||||
opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_git_commits(opts))
|
||||
local git_command = vim.F.if_nil(opts.git_command, { "git", "log", "--pretty=oneline", "--abbrev-commit" })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user