aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-26 15:39:09 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-15 17:58:35 +0800
commit93ba82183122b6b6e3d388d0e0fad4a538052803 (patch)
tree7020800bddbd1ec8c5e36a1319eeee1c2892c5e0 /test
parent53b0688ac0cad5db4840bbed1d7e5ccac3a1ee42 (diff)
downloadrneovim-93ba82183122b6b6e3d388d0e0fad4a538052803.tar.gz
rneovim-93ba82183122b6b6e3d388d0e0fad4a538052803.tar.bz2
rneovim-93ba82183122b6b6e3d388d0e0fad4a538052803.zip
vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc
Problem: Mode is not cleared when leaving Insert mode with mapped Esc. Solution: Clear the mode when redraw_cmdline is set. (closes vim/vim#4269) https://github.com/vim/vim/commit/4c25bd785aa8b565bf973cbba12ed36b76daaa4f
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/messages_spec.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua
index f3a742a3e0..41f3007b81 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -376,6 +376,32 @@ describe('messages', function()
|
]])
end)
+
+ -- oldtest: Test_mode_message_at_leaving_insert_with_esc_mapped()
+ it('leaving Insert mode with ESC in the middle of a mapping vim-patch:8.1.1192', function()
+ exec([[
+ set laststatus=2
+ inoremap <Esc> <Esc>00
+ ]])
+ feed('i')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {3:[No Name] }|
+ {2:-- INSERT --} |
+ ]])
+ feed('<Esc>')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {3:[No Name] }|
+ |
+ ]])
+ end)
end)
-- oldtest: Test_ask_yesno()