Skip to content

Commit

Permalink
1. handle makeprg/grepprg correctly
Browse files Browse the repository at this point in the history
2. accept `%` and `$*` macros in makeprg/grepprg
3. close #96 #84 and #35
  • Loading branch information
skywind3000 committed Apr 16, 2018
1 parent e7ac39d commit 347416b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ See: [Cooperate with famous plugins](https://github.com/skywind3000/asyncrun.vim

## History

- 1.3.25 (2018-04-16): handle makeprg/grepprg correctly, accept `%` and `$*` macros.
- 1.3.24 (2018-04-13): remove trailing ^M on windows.
- 1.3.23 (2018-04-03): back compatible to vim 7.3, can fall back to mode 1 in old vim.
- 1.3.22 (2018-03-11): new option `g:asyncrun_open` to open quickfix window automatically at given height.
Expand Down
13 changes: 11 additions & 2 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
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
"
" Last Modified: 2018/04/13 16:42
" Last Modified: 2018/04/16 16:12
"
" Run shell command in background and output to quickfix:
" :AsyncRun[!] [options] {cmd} ...
Expand Down Expand Up @@ -963,6 +963,9 @@ function! s:run(opts)
let l:command = l:program
endif
let l:command = s:StringStrip(l:command)
let s:async_program_cmd = ''
silent exec 'AsyncRun -program=parse @ '. l:command
let l:command = s:async_program_cmd
endif

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

" parse makeprg/grepprg and return
if l:opts.program == 'parse'
let s:async_program_cmd = l:command
return s:async_program_cmd
endif

" check cwd
if l:opts.cwd != ''
for [l:key, l:val] in items(l:macros)
Expand Down Expand Up @@ -1212,7 +1221,7 @@ endfunc
" asyncrun -version
"----------------------------------------------------------------------
function! asyncrun#version()
return '1.3.24'
return '1.3.25'
endfunc


Expand Down

0 comments on commit 347416b

Please sign in to comment.