Skip to content

Commit cd36f5a

Browse files
author
skywind3000
committed
update asyncrun to 2.3.0
1 parent 6b59f1e commit cd36f5a

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

README.md

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

365365
## History
366366

367+
- 2.3.0 (2020-02-10): new mode aliases, minor issue fix.
367368
- 2.2.9 (2020-02-10): new terminal mode options: `-safe=1`, `-listed=0` and `-reuse`.
368369
- 2.2.6 (2020-02-06): new: parameter `-hidden` when using `-mode=term` to set `bufhidden` to `hidden`.
369370
- 2.2.5 (2020-02-05): more safe to start a terminal.

plugin/asyncrun.vim

Lines changed: 17 additions & 3 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/02/10 06:16
6+
" Last Modified: 2020/02/10 17:57
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1237,7 +1237,7 @@ endfunc
12371237
" run command
12381238
"----------------------------------------------------------------------
12391239
function! s:run(opts)
1240-
let l:opts = a:opts
1240+
let l:opts = deepcopy(a:opts)
12411241
let l:command = a:opts.cmd
12421242
let l:retval = ''
12431243
let l:mode = g:asyncrun_mode
@@ -1260,6 +1260,18 @@ function! s:run(opts)
12601260
if type(l:mode) == type('') && l:mode == 'raw'
12611261
let l:mode = 0
12621262
let l:opts.raw = 1
1263+
elseif type(l:mode) == 0 && l:mode == 6
1264+
let pos = get(l:opts, 'pos', '')
1265+
if pos == 'bang' || pos == 'vim'
1266+
let l:mode = 2
1267+
elseif pos == 'extern' || pos == 'external'
1268+
let l:mode = 4
1269+
elseif pos == 'system' || pos == 'os'
1270+
let l:mode = 4
1271+
elseif pos == 'quickfix'
1272+
let l:mode = 0
1273+
let l:opts.raw = 1
1274+
endif
12631275
endif
12641276

12651277
" process makeprg/grepprg in -program=?
@@ -1637,7 +1649,7 @@ endfunc
16371649
" asyncrun -version
16381650
"----------------------------------------------------------------------
16391651
function! asyncrun#version()
1640-
return '2.2.9'
1652+
return '2.3.0'
16411653
endfunc
16421654

16431655

@@ -1898,4 +1910,6 @@ if has("autocmd")
18981910
endif
18991911

19001912

1913+
" vim: set ts=4 sw=4 tw=78 noet :
1914+
19011915

0 commit comments

Comments
 (0)