From d40fd4490410703ee835dbb88019cd8a17c23840 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 15 Mar 2013 10:18:30 +0100 Subject: [PATCH] Fix bug when calling GitGutterDisable immediately. When opening Vim without editing any file, calling GitGutterDisable would fail because `s:file` was undefined at that point. The fix breaks what encapsulation there is, but has the virtue of working. --- plugin/gitgutter.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index b1f2528..c333762 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -18,6 +18,8 @@ if !exists('g:gitgutter_sign_column_always') let g:gitgutter_sign_column_always = 0 endif +let s:file = '' + function! s:init() if !exists('g:gitgutter_initialised') call s:define_sign_column_highlight()