Turn off gitgutter for any buffer with a vimdiff window.

Closes #303.
This commit is contained in:
Andy Stewart
2018-02-14 11:10:59 +00:00
parent 4e911819be
commit 85f6e136bd
2 changed files with 30 additions and 4 deletions

View File

@@ -45,6 +45,8 @@ function! gitgutter#process_buffer(bufnr, force) abort
endif
endif
else
call s:clear(a:bufnr)
endif
endfunction
@@ -59,9 +61,7 @@ function! gitgutter#disable() abort
for bufnr in buflist
let file = expand('#'.bufnr.':p')
if !empty(file)
call gitgutter#sign#clear_signs(bufnr)
call gitgutter#sign#remove_dummy_sign(bufnr, 1)
call gitgutter#hunk#reset(bufnr)
call s:clear(bufnr)
endif
endfor
@@ -87,3 +87,8 @@ function! s:has_fresh_changes(bufnr) abort
return getbufvar(a:bufnr, 'changedtick') != gitgutter#utility#getbufvar(a:bufnr, 'tick')
endfunction
function! s:clear(bufnr)
call gitgutter#sign#clear_signs(a:bufnr)
call gitgutter#sign#remove_dummy_sign(a:bufnr, 1)
call gitgutter#hunk#reset(a:bufnr)
endfunction