aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnmol Sethi <anmol@aubble.com>2016-12-26 20:27:44 -0500
committerAnmol Sethi <anmol@aubble.com>2016-12-27 16:17:58 -0500
commite59147d1bab21c99c9e95e00e53b725d24fed1e2 (patch)
tree0c45b013a6b2b32b18b0b9445b1798336a30a36b
parent7f9a95e5ead507a307269dcc72976ba6575d21e6 (diff)
downloadrneovim-e59147d1bab21c99c9e95e00e53b725d24fed1e2.tar.gz
rneovim-e59147d1bab21c99c9e95e00e53b725d24fed1e2.tar.bz2
rneovim-e59147d1bab21c99c9e95e00e53b725d24fed1e2.zip
man.vim: completion now respects 'wildignorecase'
-rw-r--r--runtime/autoload/man.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index 77b76d383c..8ac8069730 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -247,8 +247,12 @@ function! man#complete(arg_lead, cmd_line, cursor_pos) abort
endfunction
function! s:complete(sect, psect, name) abort
- " We remove duplicates incase the same manpage in different languages was found.
- return uniq(sort(map(globpath(s:mandirs,'man?/'.a:name.'*.'.a:sect.'*', 0, 1), 's:format_candidate(v:val, a:psect)'), 'i'))
+ let old_fic = &fileignorecase
+ let &fileignorecase = &wildignorecase
+ let pages = globpath(s:mandirs,'man?/'.a:name.'*.'.a:sect.'*', 0, 1)
+ let &fileignorecase = old_fic
+ " We remove duplicates in case the same manpage in different languages was found.
+ return uniq(sort(map(pages, 's:format_candidate(v:val, a:psect)'), 'i'))
endfunction
function! s:format_candidate(path, psect) abort