aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/messages_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-16 08:13:42 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-06-16 08:55:05 +0800
commit11060793d6544e893f31d65e8f964453c463407c (patch)
treefc1d9c844283da12dfe91b716f97976b66bcfabd /test/functional/legacy/messages_spec.lua
parentcba07dad494558a4a06e25a35521041864697be3 (diff)
downloadrneovim-11060793d6544e893f31d65e8f964453c463407c.tar.gz
rneovim-11060793d6544e893f31d65e8f964453c463407c.tar.bz2
rneovim-11060793d6544e893f31d65e8f964453c463407c.zip
vim-patch:9.0.1635: error message is cleared when removing mode message
Problem: Error message is cleared when removing mode message. Solution: Also reset flags when the message is further down. https://github.com/vim/vim/commit/da51ad51bf4fbd66619786d0e6a83fb3ca09930b Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/legacy/messages_spec.lua')
-rw-r--r--test/functional/legacy/messages_spec.lua23
1 files changed, 20 insertions, 3 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua
index 0a4d418e9c..a604e68822 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -54,6 +54,7 @@ describe('messages', function()
screen = Screen.new(60, 10)
screen:set_default_attr_ids({
[0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ [1] = {background = Screen.colors.Red, foreground = Screen.colors.White}, -- ErrorMsg
})
screen:attach()
exec([[
@@ -64,13 +65,13 @@ describe('messages', function()
endfunction
set showmode
set cmdheight=1
- call setline(1, ['one', 'two', 'three'])
+ call setline(1, ['one', 'NoSuchFile', 'three'])
]])
feed('gx')
screen:expect([[
^one |
- two |
+ NoSuchFile |
three |
{0:~ }|
{0:~ }|
@@ -85,7 +86,7 @@ describe('messages', function()
feed('vEgx')
screen:expect([[
^one |
- two |
+ NoSuchFile |
three |
{0:~ }|
{0:~ }|
@@ -95,6 +96,22 @@ describe('messages', function()
{0:~ }|
from DebugSilent visual |
]])
+
+ -- removing the mode message used to also clear the error message
+ command('set cmdheight=2')
+ feed('2GvEgf')
+ screen:expect([[
+ one |
+ NoSuchFil^e |
+ three |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ from DebugSilent visual |
+ {1:E447: Can't find file "NoSuchFile" in path} |
+ ]])
end)
describe('more prompt', function()