mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -177,6 +177,23 @@ function! s:Tree(path) abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:CeilingDirectories() abort
|
||||
if !exists('s:ceiling_directories')
|
||||
let s:ceiling_directories = []
|
||||
let resolve = 1
|
||||
for dir in split($GIT_CEILING_DIRECTORIES, has('win32') ? ';' : ':', 1)
|
||||
if empty(dir)
|
||||
let resolve = 0
|
||||
elseif resolve
|
||||
call add(s:ceiling_directories, resolve(dir))
|
||||
else
|
||||
call add(s:ceiling_directories, dir)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
return s:ceiling_directories + get(g:, 'ceiling_directories', [])
|
||||
endfunction
|
||||
|
||||
function! FugitiveExtractGitDir(path) abort
|
||||
let path = s:Slash(a:path)
|
||||
if path =~# '^fugitive:'
|
||||
@ -203,7 +220,7 @@ function! FugitiveExtractGitDir(path) abort
|
||||
if root =~# '\v^//%([^/]+/?)?$'
|
||||
break
|
||||
endif
|
||||
if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0
|
||||
if index(s:CeilingDirectories(), root) >= 0
|
||||
break
|
||||
endif
|
||||
if root ==# $GIT_WORK_TREE && FugitiveIsGitDir(env_git_dir)
|
||||
|
Reference in New Issue
Block a user