aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-22 05:30:21 +0800
committerGitHub <noreply@github.com>2024-08-22 05:30:21 +0800
commit362389eb1552abd60df393e38c1fb23b12dafe1d (patch)
treecb07a48afb34ca569c7615a76c940c367dec2382 /test
parent4e5607eb37f2aac8a9b433cd529aec9167128b38 (diff)
downloadrneovim-362389eb1552abd60df393e38c1fb23b12dafe1d.tar.gz
rneovim-362389eb1552abd60df393e38c1fb23b12dafe1d.tar.bz2
rneovim-362389eb1552abd60df393e38c1fb23b12dafe1d.zip
vim-patch:9.1.0683: mode() returns wrong value with <Cmd> mapping (#30109)
Problem: mode() returns wrong value with <Cmd> mapping Solution: Change decision priority of VIsual_active and move visual mode a bit further down (kuuote) closes: vim/vim#15533 https://github.com/vim/vim/commit/0fd1cb1b1fc90b68cb37f71e65289eadac3588a6 Co-authored-by: kuuote <znmxodq1@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_functions.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index df4c6b1556..7047a62017 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -810,6 +810,10 @@ func Test_mode()
call feedkeys("gQ\<Insert>\<F2>vi\<CR>", 'xt')
call assert_equal("c-cvr", g:current_modes)
+ " Commandline mode in Visual mode should return "c-c", never "v-v".
+ call feedkeys("v\<Cmd>call input('')\<CR>\<F2>\<CR>\<Esc>", 'xt')
+ call assert_equal("c-c", g:current_modes)
+
" Executing commands in Vim Ex mode should return "cv", never "cvr",
" as Cmdline editing has already ended.
call feedkeys("gQcall Save_mode()\<CR>vi\<CR>", 'xt')