Initial Windows support for msgfmt

For now, it is tested successfully on the latest Vim 8.2 running on Windows 10.
Needs further change and testing for Neovim and older Vim versions.
This commit is contained in:
eevan78 2020-08-15 02:52:48 +04:00 committed by GitHub
parent c78c1fb870
commit ad80550252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,9 +153,12 @@ if v:version >= 800 && has("job")
endfunction
function! airline#async#get_msgfmt_stat(cmd, file)
if g:airline#init#is_windows || !executable('msgfmt')
" no msgfmt on windows?
if !executable('msgfmt')
" no msgfmt
return
endif
if g:airline#init#is_windows
let cmd = 'cmd /C ' . a:cmd. shellescape(a:file)
else
let cmd = ['sh', '-c', a:cmd. shellescape(a:file)]
endif