From 52d006682314a353a2ea951a8e443067f1db7eb4 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 22 Aug 2022 09:42:07 +0100 Subject: [PATCH] Ensure older vims process buffer at startup In this context older vims are those without timer_start() and lambda. The plugin always used to process the buffer at startup. Then in #734 an optimisation was introduced to defer processing at startup, to keep vim's startup fast. However in this optimisation older vim's unintentionally lost their startup processing altogether. --- plugin/gitgutter.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index 81dcc9c..008724e 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -247,6 +247,8 @@ function! s:on_bufenter() if has('vim_starting') && !$VIM_GITGUTTER_TEST if exists('*timer_start') && has('lambda') call s:next_tick("call gitgutter#process_buffer(+".bufnr('').", 0)") + else + call gitgutter#process_buffer(bufnr(''), 0) endif return endif