Fix FileChangedShellPost handler on terminal vim.

It seems to be necessary to delay the update by 1 tick.

See #607.
This commit is contained in:
Andy Stewart
2019-08-28 09:07:07 +01:00
parent 7e3b079e6a
commit 83eb5377be

View File

@@ -220,7 +220,11 @@ augroup gitgutter
autocmd BufEnter * call s:on_bufenter()
autocmd CursorHold,CursorHoldI * call gitgutter#process_buffer(bufnr(''), 0)
if exists('*timer_start') && has('lambda')
autocmd FileChangedShellPost * call timer_start(1, {-> gitgutter#process_buffer(bufnr(''), 1)})
else
autocmd FileChangedShellPost * call gitgutter#process_buffer(bufnr(''), 1)
endif
" Ensure that all buffers are processed when opening vim with multiple files, e.g.:
"