mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 22:33:51 -05:00
Respect 'wildignorecase' when completing :Gedit
This commit is contained in:
@@ -117,12 +117,13 @@ function! s:Resolve(path) abort
|
|||||||
return path
|
return path
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:FileIgnoreCase() abort
|
function! s:FileIgnoreCase(for_completion) abort
|
||||||
return exists('+fileignorecase') && &fileignorecase
|
return (exists('+fileignorecase') && &fileignorecase)
|
||||||
|
\ || (a:for_completion && exists('+wildignorecase') && &wildignorecase)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:cpath(path, ...) abort
|
function! s:cpath(path, ...) abort
|
||||||
if s:FileIgnoreCase()
|
if s:FileIgnoreCase(0)
|
||||||
let path = FugitiveVimPath(tolower(a:path))
|
let path = FugitiveVimPath(tolower(a:path))
|
||||||
else
|
else
|
||||||
let path = FugitiveVimPath(a:path)
|
let path = FugitiveVimPath(a:path)
|
||||||
@@ -1477,7 +1478,8 @@ function! s:FilterEscape(items, ...) abort
|
|||||||
let items = copy(a:items)
|
let items = copy(a:items)
|
||||||
call map(items, 's:fnameescape(v:val)')
|
call map(items, 's:fnameescape(v:val)')
|
||||||
if a:0 && type(a:1) == type('')
|
if a:0 && type(a:1) == type('')
|
||||||
call filter(items, 'strpart(v:val, 0, strlen(a:1)) ==# a:1')
|
let cmp = s:FileIgnoreCase(1) ? '==?' : '==#'
|
||||||
|
call filter(items, 'strpart(v:val, 0, strlen(a:1)) ' . cmp . ' a:1')
|
||||||
endif
|
endif
|
||||||
return items
|
return items
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user