Add option to disable asynchronous diffs.

Closes #318.
This commit is contained in:
Andy Stewart
2016-04-21 10:29:11 +01:00
parent cc77f32b5b
commit 530bf68fca
4 changed files with 22 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ function! gitgutter#diff#run_diff(realtime, preserve_full_diff)
call setbufvar(bufnr, 'gitgutter_tracked', 1)
endif
if has('nvim') && !a:preserve_full_diff
if g:gitgutter_async && has('nvim') && !a:preserve_full_diff
let cmd = gitgutter#utility#command_in_directory_of_file(cmd)
" Note that when `cmd` doesn't produce any output, i.e. the diff is empty,
" the `stdout` event is not fired on the job handler. Therefore we keep