11" asyncrun.vim - Run shell commands in background and output to quickfix
22"
3- " Maintainer: skywind3000 (at) gmail.com, 2016-2023
3+ " Maintainer: skywind3000 (at) gmail.com, 2016-2024
44" Homepage: https://github.com/skywind3000/asyncrun.vim
55"
6- " Last Modified: 2023/09/25 23:19
6+ " Last Modified: 2024/02/16 11:36
77"
88" Run shell command in background and output to quickfix:
99" :AsyncRun[!] [options] {cmd} ...
@@ -1083,7 +1083,9 @@ function! asyncrun#fullname(f)
10831083let f = ' '
10841084elseif &bt != ' '
10851085let is_directory= 0
1086- if f = ~' [\/\\]$'
1086+ if f = ~' \v^fugitive\:[\\\/][\\\/][\\\/]'
1087+ return asyncrun#fullname (f )
1088+ elseif f = ~' [\/\\]$'
10871089if f = ~' ^[\/\\]' || f = ~' ^.:[\/\\]'
10881090let is_directory= isdirectory (f )
10891091endif
@@ -1092,6 +1094,13 @@ function! asyncrun#fullname(f)
10921094endif
10931095elseif f = ~' ^\~[\/\\]'
10941096let f = expand (f )
1097+ elseif f = ~' \v^fugitive\:[\\\/][\\\/][\\\/]'
1098+ let path = strpart (f ,s: asyncrun_windows ?12 :11 )
1099+ let pos= stridx (path ,' .git' )
1100+ if pos>= 0
1101+ let path = strpart (path ,0 , pos)
1102+ endif
1103+ let f = fnamemodify (path ,' :h' )
10951104endif
10961105let f = fnamemodify (f ,' :p' )
10971106if s: asyncrun_windows
@@ -1139,12 +1148,6 @@ endfunc
11391148" guess root
11401149function ! s: guess_root (filename, markers)
11411150let fullname= asyncrun#fullname (a: filename )
1142- if fullname= ~' ^fugitive:/'
1143- if exists (' b:git_dir' )
1144- return fnamemodify (b: git_dir ,' :h' )
1145- endif
1146- return ' ' " skip any fugitive buffers early
1147- endif
11481151let pivot= fullname
11491152if ! isdirectory (pivot)
11501153let pivot= fnamemodify (pivot,' :h' )
@@ -2295,7 +2298,7 @@ endfunc
22952298" asyncrun - version
22962299" ----------------------------------------------------------------------
22972300function ! asyncrun#version ()
2298- return ' 2.12.2 '
2301+ return ' 2.12.3 '
22992302endfunc
23002303
23012304