Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99b5025

Browse files
author
skywind3000
committed
Added handling for fugitive buffers in asyncrun#fullname() function
1 parent61cc308 commit99b5025

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

‎plugin/asyncrun.vim‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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
letf=''
10841084
elseif &bt!=''
10851085
let is_directory=0
1086-
iff=~'[\/\\]$'
1086+
iff=~'\v^fugitive\:[\\\/][\\\/][\\\/]'
1087+
returnasyncrun#fullname(f)
1088+
elseiff=~'[\/\\]$'
10871089
iff=~'^[\/\\]'||f=~'^.:[\/\\]'
10881090
let is_directory=isdirectory(f)
10891091
endif
@@ -1092,6 +1094,13 @@ function! asyncrun#fullname(f)
10921094
endif
10931095
elseiff=~'^\~[\/\\]'
10941096
letf=expand(f)
1097+
elseiff=~'\v^fugitive\:[\\\/][\\\/][\\\/]'
1098+
letpath=strpart(f,s:asyncrun_windows?12 :11)
1099+
let pos=stridx(path,'.git')
1100+
if pos>=0
1101+
letpath=strpart(path,0, pos)
1102+
endif
1103+
letf=fnamemodify(path,':h')
10951104
endif
10961105
letf=fnamemodify(f,':p')
10971106
ifs:asyncrun_windows
@@ -1139,12 +1148,6 @@ endfunc
11391148
" guess root
11401149
function!s:guess_root(filename, markers)
11411150
let fullname=asyncrun#fullname(a:filename)
1142-
if fullname=~'^fugitive:/'
1143-
ifexists('b:git_dir')
1144-
returnfnamemodify(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
"----------------------------------------------------------------------
22972300
function!asyncrun#version()
2298-
return'2.12.2'
2301+
return'2.12.3'
22992302
endfunc
23002303

23012304

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp