Fix error when toggling on a new file

Toggling on a new file lead to an error since b:sy wouldn't exist at
that time.

Closes #124.
This commit is contained in:
Kevin 2014-05-05 10:14:10 -04:00 committed by Marco Hinz
parent 96ed0cca85
commit 9ca274d792

View File

@ -114,7 +114,7 @@ endfunction
" Function: #toggle {{{1 " Function: #toggle {{{1
function! sy#toggle() abort function! sy#toggle() abort
if empty(b:sy.path) if !exists('b:sy') || empty(b:sy.path)
echomsg 'signify: I cannot sy empty buffers!' echomsg 'signify: I cannot sy empty buffers!'
return return
endif endif