Pull out s:fileignorecase()

This commit is contained in:
Rob Pilling
2020-02-18 18:04:10 +00:00
committed by Tim Pope
parent 2e67f82b79
commit 349b18d373

View File

@@ -117,8 +117,12 @@ function! s:Resolve(path) abort
return path return path
endfunction endfunction
function! s:FileIgnoreCase() abort
return exists('+fileignorecase') && &fileignorecase
endfunction
function! s:cpath(path, ...) abort function! s:cpath(path, ...) abort
if exists('+fileignorecase') && &fileignorecase if s:FileIgnoreCase()
let path = FugitiveVimPath(tolower(a:path)) let path = FugitiveVimPath(tolower(a:path))
else else
let path = FugitiveVimPath(a:path) let path = FugitiveVimPath(a:path)