mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +02:00
fix(laygit): use correct .git root for git blame
This commit is contained in:
parent
53911748dd
commit
d23e8572e8
1 changed files with 2 additions and 1 deletions
|
@ -154,7 +154,8 @@ function M.blame_line(opts)
|
|||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
local line = cursor[1]
|
||||
local file = vim.api.nvim_buf_get_name(0)
|
||||
local cmd = { "git", "log", "-n", opts.count, "-u", "-L", line .. ",+1:" .. file }
|
||||
local root = LazyVim.root.detectors.pattern(0, { ".git" })[1]
|
||||
local cmd = { "git", "-C", root, "log", "-n", opts.count, "-u", "-L", line .. ",+1:" .. file }
|
||||
return require("lazy.util").float_cmd(cmd, opts)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue