aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2021-07-29 17:03:12 +0200
committerGitHub <noreply@github.com>2021-07-29 17:03:12 +0200
commit3b6d95b5f6376aead758bd67a9279d0f991e4d45 (patch)
tree6f0564fc81c137534b05944871e9160f3b3e29fe /src/nvim/testdir
parent143a920de9192d4dacee70ad3a42be27f8c7a2d0 (diff)
parent04ba81ddba047604e7df4a5a9a451d5059950e48 (diff)
downloadrneovim-3b6d95b5f6376aead758bd67a9279d0f991e4d45.tar.gz
rneovim-3b6d95b5f6376aead758bd67a9279d0f991e4d45.tar.bz2
rneovim-3b6d95b5f6376aead758bd67a9279d0f991e4d45.zip
Merge pull request #15213 from zeertzjq/vim-8.2.3236
vim-patch:8.2.3236: mode() does not indicate using CTRL-O in Select mode
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_functions.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 224ca257ab..7c00b479a3 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -534,6 +534,7 @@ func Test_mode()
set complete=.
inoremap <F2> <C-R>=Save_mode()<CR>
+ xnoremap <F2> <Cmd>call Save_mode()<CR>
normal! 3G
exe "normal i\<F2>\<Esc>"
@@ -645,6 +646,14 @@ func Test_mode()
call assert_equal("\<C-S>", mode(1))
call feedkeys("\<Esc>", 'xt')
+ " v_CTRL-O
+ exe "normal gh\<C-O>\<F2>\<Esc>"
+ call assert_equal("v-vs", g:current_modes)
+ exe "normal gH\<C-O>\<F2>\<Esc>"
+ call assert_equal("V-Vs", g:current_modes)
+ exe "normal g\<C-H>\<C-O>\<F2>\<Esc>"
+ call assert_equal("\<C-V>-\<C-V>s", g:current_modes)
+
call feedkeys(":echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt')
call assert_equal('c-c', g:current_modes)
call feedkeys("gQecho \<C-R>=Save_mode()\<CR>\<CR>vi\<CR>", 'xt')
@@ -653,6 +662,7 @@ func Test_mode()
bwipe!
iunmap <F2>
+ xunmap <F2>
set complete&
endfunc