Skip to content

Commit f88bc7b

Browse files
author
skywind3000
committed
2.4.8: run with execute if command is starting with colon
1 parent 19710f9 commit f88bc7b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

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

374374
## History
375375

376+
- 2.4.8 (2020-02-21): run with `:execute` if command is starting with colon.
376377
- 2.4.7 (2020-02-21): new customizable runners by `g:asyncrun_runner`, see [customize runner](https://github.com/skywind3000/asyncrun.vim/wiki/Customize-Runner).
377378
- 2.4.0 (2020-02-10): fixed internal terminal issue in msys.
378379
- 2.3.0 (2020-02-10): new mode aliases, minor issue fix.

plugin/asyncrun.vim

Lines changed: 8 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/21 06:16
6+
" Last Modified: 2020/02/21 10:54
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1375,7 +1375,12 @@ function! s:run(opts)
13751375
endif
13761376
endif
13771377

1378-
if l:runner != ''
1378+
let t = s:StringStrip(l:command)
1379+
1380+
if strpart(t, 0, 1) == ':'
1381+
exec strpart(t, 1)
1382+
return ''
1383+
elseif l:runner != ''
13791384
let F = g:asyncrun_runner[l:runner]
13801385
call F(l:command)
13811386
return ''
@@ -1705,7 +1710,7 @@ endfunc
17051710
" asyncrun - version
17061711
"----------------------------------------------------------------------
17071712
function! asyncrun#version()
1708-
return '2.4.7'
1713+
return '2.4.8'
17091714
endfunc
17101715

17111716

0 commit comments

Comments
 (0)