diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index be82d6a..5ce0233 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -66,9 +66,11 @@ endfunction function! s:set_clean_variables(file, vcs) let var=getbufvar(fnameescape(a:file), 'buffer_vcs_config', {}) - let var[a:vcs].dirty=1 - call setbufvar(fnameescape(a:file), 'buffer_vcs_config', var) - unlet! b:airline_head + if has_key(var, a:vcs) && has_key(var[a:vcs], 'dirty') + let var[a:vcs].dirty=1 + call setbufvar(fnameescape(a:file), 'buffer_vcs_config', var) + unlet! b:airline_head + endif endfunction function! s:on_exit_clean(...) dict abort