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)
10831083 let f = ' '
10841084 elseif &bt != ' '
10851085 let is_directory = 0
1086- if f = ~ ' [\/\\]$'
1086+ if f = ~ ' \v^fugitive\:[\\\/][\\\/][\\\/]'
1087+ return asyncrun#fullname (f )
1088+ elseif f = ~ ' [\/\\]$'
10871089 if f = ~ ' ^[\/\\]' || f = ~ ' ^.:[\/\\]'
10881090 let is_directory = isdirectory (f )
10891091 endif
@@ -1092,6 +1094,13 @@ function! asyncrun#fullname(f)
10921094 endif
10931095 elseif f = ~ ' ^\~[\/\\]'
10941096 let 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' )
10951104 endif
10961105 let f = fnamemodify (f , ' :p' )
10971106 if s: asyncrun_windows
@@ -1139,12 +1148,6 @@ endfunc
11391148" guess root
11401149function ! s: guess_root (filename, markers)
11411150 let 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
11481151 let pivot = fullname
11491152 if ! isdirectory (pivot)
11501153 let 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
0 commit comments