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 authored and GitHub committed 2020-08-15 02:52:48 +04:00
1 parent c78c1fb870
commit ad80550252
1 file changed
+5 -2
+5 -2
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