From ea79bc01c2efc84cf8e71fbe5fd8adbf4242739d Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 11 Sep 2020 11:44:35 +0100 Subject: [PATCH] Skip processing on BufEnter while vim is starting This is to keep vim's startup as fast as possible. Closes #734. --- plugin/gitgutter.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index f0cffdf..f803a24 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -226,6 +226,8 @@ nnoremap GitGutterPreviewHunk :call gitgutter#utility#warn('ple function! s:on_bufenter() call gitgutter#setup_maps() + if has('vim_starting') && !$VIM_GITGUTTER_TEST | return | endif + if exists('t:gitgutter_didtabenter') && t:gitgutter_didtabenter let t:gitgutter_didtabenter = 0 call gitgutter#all(!g:gitgutter_terminal_reports_focus)