mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
vim-patch:9.1.1505: not possible to return completion type for :ex command
Problem: not possible to return command-line completion type for :ex
command
Solution: make getcmdcompltype() accept an optional and return the
command-line completion for that arg (Shougo Matsushita).
closes: vim/vim#17606
5d2354fc07
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
This commit is contained in:
@ -4601,4 +4601,14 @@ func Test_range_complete()
|
||||
set wildcharm=0
|
||||
endfunc
|
||||
|
||||
func Test_getcmdcompltype_with_pat()
|
||||
call assert_fails('call getcmdcompltype({})', 'E1174:')
|
||||
call assert_equal(getcmdcompltype(''), 'command')
|
||||
call assert_equal(getcmdcompltype('dummy '), '')
|
||||
call assert_equal(getcmdcompltype('cd '), 'dir_in_path')
|
||||
call assert_equal(getcmdcompltype('let v:n'), 'var')
|
||||
call assert_equal(getcmdcompltype('call tag'), 'function')
|
||||
call assert_equal(getcmdcompltype('help '), 'help')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user