handle cases where the augroup has not be defined yet. resolves #492

This commit is contained in:
Bailey Ling 2014-04-19 14:16:36 -04:00
parent 66d0a47f37
commit abee990d30
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ endfunction!
function! airline#extensions#whitespace#toggle()
if s:enabled
autocmd! airline_whitespace CursorHold,BufWritePost
augroup airline_whitespace
autocmd!
augroup END
augroup! airline_whitespace
let s:enabled = 0
else