From c623461719fabdc39bba69d205aca2e2bec4b531 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 18 Jul 2018 10:51:51 +1200 Subject: Only add uppercase 'wildignore' if it matters --- vim/plugin/wildignore.vim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vim/plugin/wildignore.vim b/vim/plugin/wildignore.vim index b87b62b1..b10eaa01 100644 --- a/vim/plugin/wildignore.vim +++ b/vim/plugin/wildignore.vim @@ -154,12 +154,15 @@ function! s:Wildignore() abort \,'*.swp' \ ] - " For any that had lowercase letters, add their uppercase analogues - for l:ignore in l:ignores - if l:ignore =~# '\l' - call add(l:ignores, toupper(l:ignore)) - endif - endfor + " If on a system where case matters for filenames, for any that had + " lowercase letters, add their uppercase analogues + if has('fname_case') + for l:ignore in l:ignores + if l:ignore =~# '\l' + call add(l:ignores, toupper(l:ignore)) + endif + endfor + endif " Return the completed setting return join(l:ignores, ',') -- cgit v1.2.3