async: check dictionary keys before trying to access them

This commit is contained in:
Christian Brabandt 2019-05-01 07:45:06 +02:00
parent 8169aa25af
commit 2db882e9b8
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -66,9 +66,11 @@ endfunction
function! s:set_clean_variables(file, vcs)
let var=getbufvar(fnameescape(a:file), 'buffer_vcs_config', {})
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