Skip to content

Commit 61c0df6

Browse files
author
skywind3000
committed
fire AsyncRunInit autocmd when first AsyncRun command is called in the first time
1 parent 951afcb commit 61c0df6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

plugin/asyncrun.vim

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016-2021
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2021/12/15 03:45
6+
" Last Modified: 2021/12/15 04:45
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1779,6 +1779,12 @@ function! asyncrun#run(bang, opts, args, ...)
17791779
let l:macros['VIM_FILEEXT'] = ''
17801780
endif
17811781

1782+
" fire AsyncRunInit autocmd
1783+
if get(s:, 'asyncrun_init', 0) == 0
1784+
call s:AutoCmd('Init')
1785+
let s:asyncrun_init = 1
1786+
endif
1787+
17821788
" extract options
17831789
let [l:command, l:opts] = s:ExtractOpt(s:StringStrip(a:args))
17841790

@@ -1918,7 +1924,7 @@ endfunc
19181924
" asyncrun - version
19191925
"----------------------------------------------------------------------
19201926
function! asyncrun#version()
1921-
return '2.8.7'
1927+
return '2.8.8'
19221928
endfunc
19231929

19241930

0 commit comments

Comments
 (0)