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

Commita64d799

Browse files
author
skywind3000
committed
fix minor issues
1 parent29757c6 commita64d799

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

‎plugin/asyncrun.vim‎

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016-2023
44
" Homepage: https://github.com/skywind3000/asyncrun.vim
55
"
6-
" Last Modified: 2023/09/1918:47
6+
" Last Modified: 2023/09/1923:48
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1074,7 +1074,7 @@ function! asyncrun#fullname(f)
10741074
letf=expand('%')
10751075
if &bt=='terminal'
10761076
letf=''
1077-
elseif &bt=='nofile'
1077+
elseif &bt!=''
10781078
let is_directory=0
10791079
iff=~'[\/\\]$'
10801080
iff=~'^[\/\\]'||f=~'^.:[\/\\]'
@@ -1129,41 +1129,43 @@ function! s:path_join(home, name)
11291129
endif
11301130
endfunc
11311131

1132-
" find project root
1133-
function!s:find_root(path, markers, strict)
1134-
function!s:guess_root(filename, markers)
1135-
let fullname=asyncrun#fullname(a:filename)
1136-
if fullname=~'^fugitive:/'
1137-
ifexists('b:git_dir')
1138-
returnfnamemodify(b:git_dir,':h')
1139-
endif
1140-
return''" skip any fugitive buffers early
1141-
endif
1142-
let pivot= fullname
1143-
if!isdirectory(pivot)
1144-
let pivot=fnamemodify(pivot,':h')
1145-
endif
1146-
while1
1147-
letprev= pivot
1148-
for markerina:markers
1149-
let newname=s:path_join(pivot, marker)
1150-
if newname=~'[\*\?\[\]]'
1151-
ifglob(newname)!=''
1152-
return pivot
1153-
endif
1154-
elseiffilereadable(newname)
1155-
return pivot
1156-
elseifisdirectory(newname)
1132+
" guess root
1133+
function!s:guess_root(filename, markers)
1134+
let fullname=asyncrun#fullname(a:filename)
1135+
if fullname=~'^fugitive:/'
1136+
ifexists('b:git_dir')
1137+
returnfnamemodify(b:git_dir,':h')
1138+
endif
1139+
return''" skip any fugitive buffers early
1140+
endif
1141+
let pivot= fullname
1142+
if!isdirectory(pivot)
1143+
let pivot=fnamemodify(pivot,':h')
1144+
endif
1145+
while1
1146+
letprev= pivot
1147+
for markerina:markers
1148+
let newname=s:path_join(pivot, marker)
1149+
if newname=~'[\*\?\[\]]'
1150+
ifglob(newname)!=''
11571151
return pivot
11581152
endif
1159-
endfor
1160-
let pivot=fnamemodify(pivot,':h')
1161-
if pivot==prev
1162-
break
1153+
elseiffilereadable(newname)
1154+
return pivot
1155+
elseifisdirectory(newname)
1156+
return pivot
11631157
endif
1164-
endwhile
1165-
return''
1166-
endfunc
1158+
endfor
1159+
let pivot=fnamemodify(pivot,':h')
1160+
if pivot==prev
1161+
break
1162+
endif
1163+
endwhile
1164+
return''
1165+
endfunc
1166+
1167+
" find project root
1168+
function!s:find_root(path, markers, strict)
11671169
ifa:path=='%'
11681170
ifexists('b:asyncrun_root')&&b:asyncrun_root!=''
11691171
returnb:asyncrun_root
@@ -2272,7 +2274,7 @@ endfunc
22722274
" asyncrun - version
22732275
"----------------------------------------------------------------------
22742276
function!asyncrun#version()
2275-
return'2.11.21'
2277+
return'2.11.22'
22762278
endfunc
22772279

22782280

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp