Skip to content

Commit 347416b

Browse files
author
skywind3000
committed
1. handle makeprg/grepprg correctly
2. accept `%` and `$*` macros in makeprg/grepprg 3. close #96 #84 and #35
1 parent e7ac39d commit 347416b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ See: [Cooperate with famous plugins](https://github.com/skywind3000/asyncrun.vim
226226

227227
## History
228228

229+
- 1.3.25 (2018-04-16): handle makeprg/grepprg correctly, accept `%` and `$*` macros.
229230
- 1.3.24 (2018-04-13): remove trailing ^M on windows.
230231
- 1.3.23 (2018-04-03): back compatible to vim 7.3, can fall back to mode 1 in old vim.
231232
- 1.3.22 (2018-03-11): new option `g:asyncrun_open` to open quickfix window automatically at given height.

plugin/asyncrun.vim

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2018/04/13 16:42
6+
" Last Modified: 2018/04/16 16:12
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -963,6 +963,9 @@ function! s:run(opts)
963963
let l:command = l:program
964964
endif
965965
let l:command = s:StringStrip(l:command)
966+
let s:async_program_cmd = ''
967+
silent exec 'AsyncRun -program=parse @ '. l:command
968+
let l:command = s:async_program_cmd
966969
endif
967970

968971
if l:command =~ '^\s*$'
@@ -1134,6 +1137,12 @@ function! asyncrun#run(bang, opts, args)
11341137
endfor
11351138
endif
11361139

1140+
" parse makeprg/grepprg and return
1141+
if l:opts.program == 'parse'
1142+
let s:async_program_cmd = l:command
1143+
return s:async_program_cmd
1144+
endif
1145+
11371146
" check cwd
11381147
if l:opts.cwd != ''
11391148
for [l:key, l:val] in items(l:macros)
@@ -1212,7 +1221,7 @@ endfunc
12121221
" asyncrun -version
12131222
"----------------------------------------------------------------------
12141223
function! asyncrun#version()
1215-
return '1.3.24'
1224+
return '1.3.25'
12161225
endfunc
12171226

12181227

0 commit comments

Comments
 (0)