Skip to content

Commit

Permalink
Make xolox#misc#complete#keywords() respect &ignorecase
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Jul 19, 2014
1 parent f6acb27 commit e5b41ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -38,7 +38,7 @@ from the source code of the miscellaneous scripts using the Python module
<!-- Start of generated documentation -->

The documentation of the 93 functions below was extracted from
19 Vim scripts on July 7, 2014 at 19:00.
19 Vim scripts on July 19, 2014 at 12:32.

### Asynchronous Vim script evaluation

Expand Down
4 changes: 2 additions & 2 deletions autoload/xolox/misc.vim
@@ -1,7 +1,7 @@
" The version of my miscellaneous scripts.
"
" Author: Peter Odding <peter@peterodding.com>
" Last Change: July 7, 2014
" Last Change: July 19, 2014
" URL: http://peterodding.com/code/vim/misc/

let g:xolox#misc#version = '1.14.1'
let g:xolox#misc#version = '1.14.2'
8 changes: 6 additions & 2 deletions autoload/xolox/misc/complete.vim
@@ -1,7 +1,7 @@
" Tab completion for user defined commands.
"
" Author: Peter Odding <peter@peterodding.com>
" Last Change: May 19, 2013
" Last Change: July 9, 2014
" URL: http://peterodding.com/code/vim/misc/

function! xolox#misc#complete#keywords(arglead, cmdline, cursorpos)
Expand All @@ -16,7 +16,11 @@ function! xolox#misc#complete#keywords(arglead, cmdline, cursorpos)
let words[word] = 1
endfor
endfor
return sort(keys(filter(words, 'v:key =~# a:arglead')))
let arguments = [keys(filter(words, 'v:key =~# a:arglead'))]
if &ignorecase
call add(arguments, 1)
endif
return call('sort', arguments)
endfunction

" vim: ts=2 sw=2 et
2 changes: 1 addition & 1 deletion doc/misc.txt
Expand Up @@ -168,7 +168,7 @@ from the source code of the miscellaneous scripts using the Python module
'vimdoctool.py' included in vim-tools [5].

The documentation of the 93 functions below was extracted from 19 Vim scripts
on July 7, 2014 at 19:00.
on July 19, 2014 at 12:32.

-------------------------------------------------------------------------------
*misc-asynchronous-vim-script-evaluation*
Expand Down

0 comments on commit e5b41ce

Please sign in to comment.