mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Check for existence of signs before clearing.
This fixes a bug whereby opening Vim on a non-git tracked file, then calling `:DisableGitGutter` or `:ToggleGitGutter`, tried to clear a variable before it had been defined.
This commit is contained in:
@@ -164,7 +164,7 @@ endfunction
|
|||||||
" Sign processing {{{
|
" Sign processing {{{
|
||||||
|
|
||||||
function! s:clear_signs(file_name)
|
function! s:clear_signs(file_name)
|
||||||
if has_key(s:sign_ids, a:file_name)
|
if exists('s:sign_ids') && has_key(s:sign_ids, a:file_name)
|
||||||
for id in s:sign_ids[a:file_name]
|
for id in s:sign_ids[a:file_name]
|
||||||
exe ":sign unplace " . id . " file=" . a:file_name
|
exe ":sign unplace " . id . " file=" . a:file_name
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
Reference in New Issue
Block a user