aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/messages_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-02-28 07:03:52 +0800
committerGitHub <noreply@github.com>2025-02-27 23:03:52 +0000
commitdf0328521f17766df9e1a8970bf5adee39b78192 (patch)
tree17d965a9c7e9ff5ab03fd3e438a0d32da105d320 /test/functional/legacy/messages_spec.lua
parent89d6d6f25cf22175e8c8eedef7181d8d618f9898 (diff)
downloadrneovim-df0328521f17766df9e1a8970bf5adee39b78192.tar.gz
rneovim-df0328521f17766df9e1a8970bf5adee39b78192.tar.bz2
rneovim-df0328521f17766df9e1a8970bf5adee39b78192.zip
vim-patch:9.1.1155: Mode message not cleared after :silent message (#32667)
Problem: Mode message not cleared after :silent message (after 9.0.1634). Solution: Don't reset mode_displayed when the message is empty. (zeertzjq) fixes: neovim/neovim#32641 closes: vim/vim#16744 https://github.com/vim/vim/commit/fce1fa5b618458f6f10028faadc9a9ddc227fe76
Diffstat (limited to 'test/functional/legacy/messages_spec.lua')
-rw-r--r--test/functional/legacy/messages_spec.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua
index db5e3f6857..f7691fdacc 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -87,6 +87,33 @@ describe('messages', function()
]])
end)
+ -- oldtest: Test_mode_cleared_after_silent_message()
+ it('mode is cleared properly after slient message', function()
+ screen = Screen.new(60, 10)
+ exec([[
+ edit XsilentMessageMode.txt
+ call setline(1, 'foobar')
+ autocmd TextChanged * silent update
+ ]])
+ finally(function()
+ os.remove('XsilentMessageMode.txt')
+ end)
+
+ feed('v')
+ screen:expect([[
+ ^foobar |
+ {1:~ }|*8
+ {5:-- VISUAL --} |
+ ]])
+
+ feed('d')
+ screen:expect([[
+ ^oobar |
+ {1:~ }|*8
+ |
+ ]])
+ end)
+
describe('more prompt', function()
before_each(function()
command('set more')