From ad80550252e331610bc98d25e7302abb485f88c7 Mon Sep 17 00:00:00 2001 From: eevan78 <27575106+eevan78@users.noreply.github.com> Date: Sat, 15 Aug 2020 02:52:48 +0400 Subject: [PATCH] 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. --- autoload/airline/async.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index 8b1678db..00cb26cc 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -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