Skip to content

Commit 3e5feef

Browse files
author
skywind3000
committed
improve project root detect
1 parent f947a2e commit 3e5feef

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

plugin/asyncrun.vim

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2020/03/22 16:00
6+
" Last Modified: 2020/03/23 13:18
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1006,11 +1006,7 @@ function! s:find_root(path, markers, strict)
10061006
let prev = pivot
10071007
for marker in a:markers
10081008
let newname = s:path_join(pivot, marker)
1009-
if stridx(newname, '*') >= 0 || stridx(newname, '?') >= 0
1010-
if glob(newname) != ''
1011-
return pivot
1012-
endif
1013-
elseif stridx(newname, '[') >= 0 || stridx(newname, ']') >= 0
1009+
if newname =~ '[\*\?\[\]]'
10141010
if glob(newname) != ''
10151011
return pivot
10161012
endif
@@ -1837,7 +1833,7 @@ endfunc
18371833
" asyncrun - version
18381834
"----------------------------------------------------------------------
18391835
function! asyncrun#version()
1840-
return '2.6.8'
1836+
return '2.6.9'
18411837
endfunc
18421838

18431839

0 commit comments

Comments
 (0)