File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 3
3
" Maintainer: skywind3000 (at) gmail.com, 2016-2022
4
4
" Homepage: https://github.com/skywind3000/asyncrun.vim
5
5
"
6
- " Last Modified: 2022/09/12 01:46
6
+ " Last Modified: 2022/09/13 17:50
7
7
"
8
8
" Run shell command in background and output to quickfix:
9
9
" :AsyncRun[!] [options] {cmd} ...
@@ -2079,6 +2079,23 @@ function! asyncrun#version()
2079
2079
endfunc
2080
2080
2081
2081
2082
+ " ----------------------------------------------------------------------
2083
+ " asyncrun - reset
2084
+ " ----------------------------------------------------------------------
2085
+ function ! asyncrun#reset ()
2086
+ call asyncrun#stop (' !' )
2087
+ let s: async_state = 0
2088
+ if exists (' s:async_timer' )
2089
+ call timer_stop (s: async_timer )
2090
+ unlet s: async_timer
2091
+ endif
2092
+ if exists (' s:async_job' )
2093
+ unlet s: async_job
2094
+ endif
2095
+ let s: async_state = 0
2096
+ endfunc
2097
+
2098
+
2082
2099
" ----------------------------------------------------------------------
2083
2100
" Commands
2084
2101
" ----------------------------------------------------------------------
@@ -2087,8 +2104,7 @@ command! -bang -nargs=+ -range=0 -complete=file AsyncRun
2087
2104
2088
2105
command ! - bar - bang -nargs =0 AsyncStop call asyncrun#stop (' <bang>' )
2089
2106
2090
- let s: script_name = expand (' <sfile>:p' )
2091
- command ! -nargs =0 AsyncReset exec ' source ' . fnameescape (s: script_name )
2107
+ command ! -nargs =0 AsyncReset call asyncrun#reset ()
2092
2108
2093
2109
2094
2110
" ----------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments