diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index 9e989ce..81dcc9c 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -245,8 +245,8 @@ function! s:on_bufenter() " been any changes to the buffer since the first round, the second round " will be cheap. if has('vim_starting') && !$VIM_GITGUTTER_TEST - if exists('*timer_start') - call timer_start(&updatetime, 'GitGutterCursorHold') + if exists('*timer_start') && has('lambda') + call s:next_tick("call gitgutter#process_buffer(+".bufnr('').", 0)") endif return endif @@ -259,10 +259,6 @@ function! s:on_bufenter() endif endfunction -function! GitGutterCursorHold(timer) - execute 'doautocmd' s:nomodeline 'gitgutter CursorHold' -endfunction - function! s:next_tick(cmd) call timer_start(1, {-> execute(a:cmd)}) endfunction