From 206e71d133fee0909a18253ad0c45625e83f0026 Mon Sep 17 00:00:00 2001 From: James Trew <66286082+jamestrew@users.noreply.github.com> Date: Mon, 14 Feb 2022 11:39:58 -0500 Subject: fix: add opts.bufnr and opts.winnr to builtin picker (#1706) --- lua/telescope/builtin/git.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/telescope/builtin/git.lua') diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 7bb7bfd..af5d4c6 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -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" }) -- cgit v1.2.3