diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2022-05-07 12:48:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-07 12:48:29 +0100 |
commit | 79d599b8772022af1d657f368c2fc97aa342c0da (patch) | |
tree | ee415de85697c73717db8ca0679481349d097965 /src/testdir/test_cmdline.vim | |
parent | c27747e6ddcbda7d1d3b39867898f746dc4db471 (diff) |
patch 8.2.4903: cannot get the current cmdline completion type and positionv8.2.4903
Problem: Cannot get the current cmdline completion type and position.
Solution: Add getcmdcompltype() and getcmdscreenpos(). (Shougo Matsushita,
closes #10344)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 5a849f77f7..e944f8d24d 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -3380,4 +3380,16 @@ func Test_cmdline_complete_substitute_short() endfor 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 |