diff options
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index a0e9f780c6..d10fad690c 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -711,6 +711,20 @@ func Test_mode() call assert_equal('c-cv', g:current_modes) " How to test Ex mode? + " Test mode in operatorfunc (it used to be Operator-pending). + set operatorfunc=OperatorFunc + function OperatorFunc(_) + call Save_mode() + endfunction + execute "normal! g@l\<Esc>" + call assert_equal('n-n', g:current_modes) + execute "normal! i\<C-o>g@l\<Esc>" + call assert_equal('n-niI', g:current_modes) + execute "normal! R\<C-o>g@l\<Esc>" + call assert_equal('n-niR', g:current_modes) + execute "normal! gR\<C-o>g@l\<Esc>" + call assert_equal('n-niV', g:current_modes) + if has('terminal') term call feedkeys("\<C-W>N", 'xt') @@ -723,6 +737,8 @@ func Test_mode() iunmap <F2> xunmap <F2> set complete& + set operatorfunc& + delfunction OperatorFunc endfunc func Test_append() |