diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-18 10:51:51 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-18 10:51:51 +1200 |
commit | c623461719fabdc39bba69d205aca2e2bec4b531 (patch) | |
tree | a3794fcfc19102253adeb10bad30e85fee4a9c0d | |
parent | Merge branch 'hotfix/v1.34.2' into develop (diff) | |
download | dotfiles-c623461719fabdc39bba69d205aca2e2bec4b531.tar.gz dotfiles-c623461719fabdc39bba69d205aca2e2bec4b531.zip |
Only add uppercase 'wildignore' if it matters
-rw-r--r-- | vim/plugin/wildignore.vim | 15 |
1 files 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, ',') |