Skip to content

Commit

Permalink
Fix bug when calling GitGutterDisable immediately.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
airblade committed Mar 15, 2013
1 parent f52625b commit d40fd44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d40fd44

Please sign in to comment.