comparison src/testdir/test_cmdline.vim @ 28757:add09d468c0d v8.2.4903

patch 8.2.4903: cannot get the current cmdline completion type and position Commit: https://github.com/vim/vim/commit/79d599b8772022af1d657f368c2fc97aa342c0da Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Sat May 7 12:48:29 2022 +0100 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 #10344)
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 May 2022 14:00:02 +0200
parents 4a9fdf708575
children f3f45218f923
comparison
equal deleted inserted replaced
28756:36c80bb26e62 28757:add09d468c0d
3378 call feedkeys(':' .. cmd .. " \<Tab>\<C-B>\"\<CR>", 'tx') 3378 call feedkeys(':' .. cmd .. " \<Tab>\<C-B>\"\<CR>", 'tx')
3379 call assert_equal('"' .. cmd .. " \<Tab>", @:) 3379 call assert_equal('"' .. cmd .. " \<Tab>", @:)
3380 endfor 3380 endfor
3381 endfunc 3381 endfunc
3382 3382
3383 func Check_completion()
3384 call assert_equal('let a', getcmdline())
3385 call assert_equal(6, getcmdpos())
3386 call assert_equal(7, getcmdscreenpos())
3387 call assert_equal('var', getcmdcompltype())
3388 return ''
3389 endfunc
3390
3391 func Test_screenpos_and_completion()
3392 call feedkeys(":let a\<C-R>=Check_completion()\<CR>\<Esc>", "xt")
3393 endfunc
3394
3383 " vim: shiftwidth=2 sts=2 expandtab 3395 " vim: shiftwidth=2 sts=2 expandtab