don't display fugitive sign on diff mode

This commit is contained in:
windwp 2021-04-15 07:37:51 +07:00 committed by Lewis Russell
parent ade1c81a88
commit 56bd673932
3 changed files with 7 additions and 2 deletions

2
lua/gitsigns.lua generated
View File

@ -412,7 +412,7 @@ local function get_buf_path(bufnr)
return vim.fn.expand('%:p')
end)
if vim.startswith(file, 'fugitive://') then
if vim.startswith(file, 'fugitive://') and vim.wo.diff == false then
local orig_path = file
file = file:gsub('^fugitive:', ''):gsub('%.git/+%x-/', '')
file = uv.fs_realpath(file)

View File

@ -412,7 +412,7 @@ local function get_buf_path(bufnr: integer): string, string
return vim.fn.expand('%:p')
end)
if vim.startswith(file, 'fugitive://') then
if vim.startswith(file, 'fugitive://') and vim.wo.diff == false then
local orig_path = file
file = file:gsub('^fugitive:',''):gsub('%.git/+%x-/', '')
file = uv.fs_realpath(file)

View File

@ -183,6 +183,11 @@ global record vim
updatetime: number
end
record wo
diff: boolean
end
record lsp
record util
close_preview_autocmd: function ({string}, number)