1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2019-12-12 23:01:41 +01:00
parent 901655ef04
commit cb57890701
7 changed files with 66 additions and 10 deletions

View File

@ -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)