aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorShougo <Shougo.Matsu@gmail.com>2022-05-09 13:52:31 +0900
committerGitHub <noreply@github.com>2022-05-09 12:52:31 +0800
commitdbdd58e548fcf55848359b696275fd848756db7b (patch)
tree145c279909c7175c6a46ed76591dbebab124a3ba /src/nvim/testdir
parentf6be28c61a66df1bd88e5aac3d2c20792c541e18 (diff)
downloadrneovim-dbdd58e548fcf55848359b696275fd848756db7b.tar.gz
rneovim-dbdd58e548fcf55848359b696275fd848756db7b.tar.bz2
rneovim-dbdd58e548fcf55848359b696275fd848756db7b.zip
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) https://github.com/vim/vim/commit/79d599b8772022af1d657f368c2fc97aa342c0da vim-patch:8.2.4910: imperfect coding Problem: Imperfect coding. Solution: Make code nicer. https://github.com/vim/vim/commit/9ff7d717aa3176de5c61de340deb93f41c7780fc
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 5c2f6f8d0b..759caac878 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -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