async: do not show dirty sign for error messages

closes #1915
This commit is contained in:
Christian Brabandt 2019-05-08 13:51:50 +02:00
parent ea7f5d5313
commit 1b41629214
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -358,7 +358,13 @@ endfunction
function! airline#async#vim7_vcs_clean(cmd, file, vcs) function! airline#async#vim7_vcs_clean(cmd, file, vcs)
" Vim pre 8, fallback using system() " Vim pre 8, fallback using system()
let output=system(a:cmd) " don't want to to see error messages
if g:airline#init#is_windows && &shell =~ 'cmd'
let cmd = a:cmd .' 2>nul'
else
let cmd = a:cmd .' 2>/dev/null'
endif
let output=system(cmd)
if !empty(output) if !empty(output)
call s:set_clean_variables(a:file, a:vcs) call s:set_clean_variables(a:file, a:vcs)
endif endif