1
1
" asyncrun.vim - Run shell commands in background and output to quickfix
2
2
"
3
- " Maintainer: skywind3000 (at) gmail.com, 2016-2023
3
+ " Maintainer: skywind3000 (at) gmail.com, 2016-2024
4
4
" Homepage: https://github.com/skywind3000/asyncrun.vim
5
5
"
6
- " Last Modified: 2023/09/25 23:19
6
+ " Last Modified: 2024/02/16 11:36
7
7
"
8
8
" Run shell command in background and output to quickfix:
9
9
" :AsyncRun[!] [options] {cmd} ...
@@ -1083,7 +1083,9 @@ function! asyncrun#fullname(f)
1083
1083
let f = ' '
1084
1084
elseif &bt != ' '
1085
1085
let is_directory = 0
1086
- if f = ~ ' [\/\\]$'
1086
+ if f = ~ ' \v^fugitive\:[\\\/][\\\/][\\\/]'
1087
+ return asyncrun#fullname (f )
1088
+ elseif f = ~ ' [\/\\]$'
1087
1089
if f = ~ ' ^[\/\\]' || f = ~ ' ^.:[\/\\]'
1088
1090
let is_directory = isdirectory (f )
1089
1091
endif
@@ -1092,6 +1094,13 @@ function! asyncrun#fullname(f)
1092
1094
endif
1093
1095
elseif f = ~ ' ^\~[\/\\]'
1094
1096
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' )
1095
1104
endif
1096
1105
let f = fnamemodify (f , ' :p' )
1097
1106
if s: asyncrun_windows
@@ -1139,12 +1148,6 @@ endfunc
1139
1148
" guess root
1140
1149
function ! s: guess_root (filename, markers)
1141
1150
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
1148
1151
let pivot = fullname
1149
1152
if ! isdirectory (pivot)
1150
1153
let pivot = fnamemodify (pivot, ' :h' )
@@ -2295,7 +2298,7 @@ endfunc
2295
2298
" asyncrun - version
2296
2299
" ----------------------------------------------------------------------
2297
2300
function ! asyncrun#version ()
2298
- return ' 2.12.2 '
2301
+ return ' 2.12.3 '
2299
2302
endfunc
2300
2303
2301
2304
0 commit comments