Skip to content

Commit

Permalink
fix: prevent gitsigns from calling diffthis on fugitive status window
Browse files Browse the repository at this point in the history
  • Loading branch information
m-demare authored and lewis6991 committed Nov 28, 2023
1 parent 5fc573f commit 175e74f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/gitsigns/diffthis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ M.update = throttle_by_id(async.void(function(bufnr)
if api.nvim_win_is_valid(w) then
local b = api.nvim_win_get_buf(w)
local bname = api.nvim_buf_get_name(b)
if bname == bufname or vim.startswith(bname, 'fugitive://') then
local is_fugitive_diff_window = vim.startswith(bname, 'fugitive://')
and vim.fn.exists('*FugitiveParse')
and vim.fn.FugitiveParse(bname)[1] ~= ':'
if bname == bufname or is_fugitive_diff_window then
if should_reload(b) then
api.nvim_buf_call(b, function()
vim.cmd.doautocmd('BufReadCmd')
Expand Down

0 comments on commit 175e74f

Please sign in to comment.