diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-28 11:46:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 11:46:20 +0800 |
commit | e6d38c7dac2e079d9b0f1621fef193bca858664f (patch) | |
tree | d585eff109bbf28495e55bed109261c5577a1d59 /test/old/testdir | |
parent | 1a8f60c7d2699826b51f23b040b83b1d96a14930 (diff) | |
download | rneovim-e6d38c7dac2e079d9b0f1621fef193bca858664f.tar.gz rneovim-e6d38c7dac2e079d9b0f1621fef193bca858664f.tar.bz2 rneovim-e6d38c7dac2e079d9b0f1621fef193bca858664f.zip |
vim-patch:9.0.2133: Cannot detect overstrike mode in Cmdline mode (#26263)
Problem: Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike
closes: vim/vim#13569
https://github.com/vim/vim/commit/d1c3ef1f47c87d1da056c56564e1985fe6f2931d
Diffstat (limited to 'test/old/testdir')
-rw-r--r-- | test/old/testdir/test_functions.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index eae9c03335..fb1523e82a 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -798,8 +798,12 @@ func Test_mode() call feedkeys(":echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt') call assert_equal('c-c', g:current_modes) + call feedkeys(":\<insert>\<C-r>=Save_mode()\<CR>",'xt') + call assert_equal("c-cr", g:current_modes) call feedkeys("gQecho \<C-R>=Save_mode()\<CR>\<CR>vi\<CR>", 'xt') call assert_equal('c-cv', g:current_modes) + call feedkeys("gQ\<insert>\<C-r>=Save_mode()\<CR>",'xt') + call assert_equal("c-cvr", g:current_modes) " call feedkeys("Qcall Save_mode()\<CR>vi\<CR>", 'xt') " call assert_equal('c-ce', g:current_modes) " How to test Ex mode? @@ -817,6 +821,18 @@ func Test_mode() call assert_equal('n-niR', g:current_modes) execute "normal! gR\<C-o>g@l\<Esc>" call assert_equal('n-niV', g:current_modes) + " Test statusline updates for overstike mode + if CanRunVimInTerminal() + let buf = RunVimInTerminal('', {'rows': 12}) + call term_sendkeys(buf, ":set laststatus=2 statusline=%!mode(1)\<CR>") + call term_sendkeys(buf, ":") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_mode_1', {}) + call term_sendkeys(buf, "\<insert>") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_mode_2', {}) + call StopVimInTerminal(buf) + endif if has('terminal') term |