Skip to content

Commit fa30b53

Browse files
author
skywind3000
committed
correctly passing arguments on windows
1 parent a7ebec5 commit fa30b53

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

plugin/asyncrun.vim

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2020/03/01 23:11
6+
" Last Modified: 2020/03/06 21:45
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -889,14 +889,10 @@ function! s:ScriptWrite(command, pause)
889889
let command = a:command
890890
if s:asyncrun_windows != 0
891891
let lines = ["@echo off\r"]
892-
try
893-
let command = iconv(command, &encoding, g:asyncrun_encs)
894-
catch /.*/
895-
endtry
896-
let lines += ['call ' . command . "\r"]
897-
if a:pause != 0
898-
let lines += ["pause\r"]
899-
endif
892+
let $VIM_COMMAND = a:command
893+
let $VIM_PAUSE = (a:pause)? 'pause' : ''
894+
let lines += ["call %VIM_COMMAND% \r"]
895+
let lines += ["call %VIM_PAUSE% \r"]
900896
else
901897
let shell = (g:asyncrun_shell != '')? g:asyncrun_shell : (&shell)
902898
let lines = ['#! ' . shell]
@@ -1729,7 +1725,7 @@ endfunc
17291725
" asyncrun - version
17301726
"----------------------------------------------------------------------
17311727
function! asyncrun#version()
1732-
return '2.5.3'
1728+
return '2.5.4'
17331729
endfunc
17341730

17351731

0 commit comments

Comments
 (0)