@@ -316,8 +316,8 @@ function! dispatch#spawn(command, ...) abort
316316 let key = request.directory ." \t " .substitute (request.expanded, ' \s*$' , ' ' , ' ' )
317317 let i = 0
318318 while i < len (get (g: DISPATCH_STARTS , key , []))
319- let [handler, pid] = split (g: DISPATCH_STARTS [key ][i ], ' @ ' )
320- if ! s: running (handler, pid )
319+ let [handler, pid] = split (g: DISPATCH_STARTS [key ][i ], ' [@/] ' )
320+ if ! s: running (pid, handler )
321321 call remove (g: DISPATCH_STARTS [key ], i )
322322 continue
323323 endif
@@ -346,7 +346,7 @@ function! dispatch#spawn(command, ...) abort
346346 if ! has_key (g: DISPATCH_STARTS , key )
347347 let g: DISPATCH_STARTS [key ] = []
348348 endif
349- call add (g: DISPATCH_STARTS [key ], request.handler.' @ ' .dispatch#pid (request))
349+ call add (g: DISPATCH_STARTS [key ], request.handler.' / ' .dispatch#pid (request))
350350 endif
351351 else
352352 execute ' !' . request.command
@@ -742,11 +742,11 @@ function! dispatch#request(...) abort
742742 return s: request (a: 0 ? a: 1 : 0 )
743743endfunction
744744
745- function ! s: running (handler, pid ) abort
745+ function ! s: running (pid, ... ) abort
746746 if empty (a: pid )
747747 return 0
748- elseif exists (' *dispatch#' .a: handler .' #running' )
749- return dispatch#{a: handler }#running (a: pid )
748+ elseif a: 0 && exists (' *dispatch#' .a: 1 .' #running' )
749+ return dispatch#{a: 1 }#running (a: pid )
750750 elseif has (' win32' )
751751 let tasklist_cmd = ' tasklist /fi "pid eq ' .a: pid .' "'
752752 if &shellxquote == # ' "'
0 commit comments