mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
feat: cmdline funcs (#18284)
vim-patch:8.2.4903: cannot get the current cmdline completion type and position
Problem: Cannot get the current cmdline completion type and position.
Solution: Add getcmdcompltype() and getcmdscreenpos(). (Shougo Matsushita,
closes vim/vim#10344)
79d599b877
vim-patch:8.2.4910: imperfect coding
Problem: Imperfect coding.
Solution: Make code nicer.
9ff7d717aa
This commit is contained in:
@@ -1212,4 +1212,16 @@ func Test_recalling_cmdline()
|
||||
cunmap <Plug>(save-cmdline)
|
||||
endfunc
|
||||
|
||||
func Check_completion()
|
||||
call assert_equal('let a', getcmdline())
|
||||
call assert_equal(6, getcmdpos())
|
||||
call assert_equal(7, getcmdscreenpos())
|
||||
call assert_equal('var', getcmdcompltype())
|
||||
return ''
|
||||
endfunc
|
||||
|
||||
func Test_screenpos_and_completion()
|
||||
call feedkeys(":let a\<C-R>=Check_completion()\<CR>\<Esc>", "xt")
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user