mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Set diff base when viewing file versions with Fugitive
When you look at previous versions of a file, e.g. with Fugitive's :0Gclog, gitgutter will set the diff base to the current version's parent so that diff markers appear as expected. Thannks to @rcreasi for the idea and initial implementation.
This commit is contained in:
@@ -33,6 +33,8 @@ function! gitgutter#process_buffer(bufnr, force) abort
|
||||
return
|
||||
endif
|
||||
|
||||
call gitgutter#utility#set_diff_base_if_fugitive(a:bufnr)
|
||||
|
||||
if a:force || s:has_fresh_changes(a:bufnr)
|
||||
|
||||
let diff = 'NOT SET'
|
||||
|
||||
Reference in New Issue
Block a user