File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,10 @@ function! GitGutterCursorHold(timer)
248
248
execute ' doautocmd' s: nomodeline ' gitgutter CursorHold'
249
249
endfunction
250
250
251
+ function ! s: next_tick (cmd)
252
+ call timer_start (1 , {- > execute (a: cmd )})
253
+ endfunction
254
+
251
255
" Autocommands {{{
252
256
253
257
augroup gitgutter
@@ -264,9 +268,9 @@ augroup gitgutter
264
268
265
269
autocmd CursorHold ,CursorHoldI * call gitgutter#process_buffer (bufnr (' ' ), 0 )
266
270
if exists (' *timer_start' ) && has (' lambda' )
267
- autocmd FileChangedShellPost * call timer_start ( 1 , { - > gitgutter#process_buffer (bufnr ( ' ' ) , 1 )} )
271
+ autocmd FileChangedShellPost * call s: next_tick ( " call gitgutter#process_buffer(+ " . expand ( ' <abuf> ' ). " , 1)" )
268
272
else
269
- autocmd FileChangedShellPost * call gitgutter#process_buffer (bufnr ( ' ' ), 1 )
273
+ autocmd FileChangedShellPost * call gitgutter#process_buffer (+ expand ( ' <abuf> ' ), 1 )
270
274
endif
271
275
272
276
" Ensure that all buffers are processed when opening vim with multiple files, e.g.:
You can’t perform that action at this time.
0 commit comments