Skip to content

Commit e5b41ce

Browse files
committed
Make xolox#misc#complete#keywords() respect &ignorecase
1 parent f6acb27 commit e5b41ce

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ from the source code of the miscellaneous scripts using the Python module
3838
<!-- Start of generated documentation -->
3939

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

4343
### Asynchronous Vim script evaluation
4444

autoload/xolox/misc.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" The version of my miscellaneous scripts.
22
"
33
" Author: Peter Odding <peter@peterodding.com>
4-
" Last Change: July 7, 2014
4+
" Last Change: July 19, 2014
55
" URL: http://peterodding.com/code/vim/misc/
66

7-
let g:xolox#misc#version = '1.14.1'
7+
let g:xolox#misc#version = '1.14.2'

autoload/xolox/misc/complete.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Tab completion for user defined commands.
22
"
33
" Author: Peter Odding <peter@peterodding.com>
4-
" Last Change: May 19, 2013
4+
" Last Change: July 9, 2014
55
" URL: http://peterodding.com/code/vim/misc/
66

77
function! xolox#misc#complete#keywords(arglead, cmdline, cursorpos)
@@ -16,7 +16,11 @@ function! xolox#misc#complete#keywords(arglead, cmdline, cursorpos)
1616
let words[word] = 1
1717
endfor
1818
endfor
19-
return sort(keys(filter(words, 'v:key =~# a:arglead')))
19+
let arguments = [keys(filter(words, 'v:key =~# a:arglead'))]
20+
if &ignorecase
21+
call add(arguments, 1)
22+
endif
23+
return call('sort', arguments)
2024
endfunction
2125

2226
" vim: ts=2 sw=2 et

doc/misc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ from the source code of the miscellaneous scripts using the Python module
168168
'vimdoctool.py' included in vim-tools [5].
169169

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

173173
-------------------------------------------------------------------------------
174174
*misc-asynchronous-vim-script-evaluation*

0 commit comments

Comments
 (0)