From 04ba81ddba047604e7df4a5a9a451d5059950e48 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 29 Jul 2021 07:12:11 +0800 Subject: vim-patch:8.2.3236: mode() does not indicate using CTRL-O in Select mode Problem: mode() does not indicate using CTRL-O in Select mode. Solution: Use "vs" and similar. (closes vim/vim#8640) https://github.com/vim/vim/commit/eaf3f36168f85c8e0ab7083cd996b9fbe937045d --- src/nvim/testdir/test_functions.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/testdir') 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 =Save_mode() + xnoremap call Save_mode() normal! 3G exe "normal i\\" @@ -645,6 +646,14 @@ func Test_mode() call assert_equal("\", mode(1)) call feedkeys("\", 'xt') + " v_CTRL-O + exe "normal gh\\\" + call assert_equal("v-vs", g:current_modes) + exe "normal gH\\\" + call assert_equal("V-Vs", g:current_modes) + exe "normal g\\\\" + call assert_equal("\-\s", g:current_modes) + call feedkeys(":echo \=Save_mode()\\", 'xt') call assert_equal('c-c', g:current_modes) call feedkeys("gQecho \=Save_mode()\\vi\", 'xt') @@ -653,6 +662,7 @@ func Test_mode() bwipe! iunmap + xunmap set complete& endfunc -- cgit