From 9ca274d792a9e6f41da2122223127fa2ab6d7a7a Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 5 May 2014 10:14:10 -0400 Subject: [PATCH] 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. --- autoload/sy.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/sy.vim b/autoload/sy.vim index 1d7004e..df6e5bc 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -114,7 +114,7 @@ endfunction " Function: #toggle {{{1 function! sy#toggle() abort - if empty(b:sy.path) + if !exists('b:sy') || empty(b:sy.path) echomsg 'signify: I cannot sy empty buffers!' return endif