Skip to content

Commit

Permalink
correctly passing arguments on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
skywind3000 committed Mar 6, 2020
1 parent a7ebec5 commit fa30b53
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions plugin/asyncrun.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
"
" Last Modified: 2020/03/01 23:11
" Last Modified: 2020/03/06 21:45
"
" Run shell command in background and output to quickfix:
" :AsyncRun[!] [options] {cmd} ...
Expand Down Expand Up @@ -889,14 +889,10 @@ function! s:ScriptWrite(command, pause)
let command = a:command
if s:asyncrun_windows != 0
let lines = ["@echo off\r"]
try
let command = iconv(command, &encoding, g:asyncrun_encs)
catch /.*/
endtry
let lines += ['call ' . command . "\r"]
if a:pause != 0
let lines += ["pause\r"]
endif
let $VIM_COMMAND = a:command
let $VIM_PAUSE = (a:pause)? 'pause' : ''
let lines += ["call %VIM_COMMAND% \r"]
let lines += ["call %VIM_PAUSE% \r"]
else
let shell = (g:asyncrun_shell != '')? g:asyncrun_shell : (&shell)
let lines = ['#! ' . shell]
Expand Down Expand Up @@ -1729,7 +1725,7 @@ endfunc
" asyncrun - version
"----------------------------------------------------------------------
function! asyncrun#version()
return '2.5.3'
return '2.5.4'
endfunc


Expand Down

0 comments on commit fa30b53

Please sign in to comment.