aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua83
1 files changed, 56 insertions, 27 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 2cff7c1cf4..0898d7fe75 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -869,7 +869,7 @@ stack traceback:
{1:~ }|
{1:~ }|
]], messages={
- { content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "" }
+ { content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "echomsg" }
}}
feed ':ls<cr>'
@@ -880,7 +880,7 @@ stack traceback:
{1:~ }|
{1:~ }|
]], messages={
- { content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "echomsg" }
+ { content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "" }
}}
feed ':messages<cr>'
@@ -1077,10 +1077,10 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim
]]}
end)
- it('redraws NOT_VALID correctly after message', function()
- -- edge case: only one window was set NOT_VALID. Original report
+ it('redraws UPD_NOT_VALID correctly after message', function()
+ -- edge case: only one window was set UPD_NOT_VALID. Original report
-- used :make, but fake it using one command to set the current
- -- window NOT_VALID and another to show a long message.
+ -- window UPD_NOT_VALID and another to show a long message.
command("set more")
feed(':new<cr><c-w><c-w>')
screen:expect{grid=[[
@@ -1200,28 +1200,6 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim
it('prints lines in Ex mode correctly with a burst of carriage returns #19341', function()
command('set number')
meths.buf_set_lines(0, 0, 0, true, {'aaa', 'bbb', 'ccc'})
- command('set display-=msgsep')
- feed('gggQ<CR><CR>1<CR><CR>vi')
- screen:expect([[
- Entering Ex mode. Type "visual" to go to Normal mode. |
- {11: 2 }bbb |
- {11: 3 }ccc |
- :1 |
- {11: 1 }aaa |
- {11: 2 }bbb |
- :vi^ |
- ]])
- feed('<CR>')
- screen:expect([[
- {11: 1 }aaa |
- {11: 2 }^bbb |
- {11: 3 }ccc |
- {11: 4 } |
- {1:~ }|
- {1:~ }|
- |
- ]])
- command('set display+=msgsep')
feed('gggQ<CR><CR>1<CR><CR>vi')
screen:expect([[
Entering Ex mode. Type "visual" to go to Normal mode. |
@@ -2020,4 +1998,55 @@ aliquip ex ea commodo consequat.]])
|
]]}
end)
+
+ it('with cmdheight=0 does not crash with g<', function()
+ command('set cmdheight=0')
+ feed(':ls<cr>')
+ screen:expect{grid=[[
+ |
+ {1:~ }|
+ {12: }|
+ :ls |
+ 1 %a "[No Name]" |
+ line 1 |
+ {4:Press ENTER or type command to cont}|
+ {4:inue}^ |
+ ]]}
+
+ feed('<cr>')
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]]}
+
+ feed('g<lt>')
+ screen:expect{grid=[[
+ |
+ {1:~ }|
+ {12: }|
+ :ls |
+ 1 %a "[No Name]" |
+ line 1 |
+ {4:Press ENTER or type command to cont}|
+ {4:inue}^ |
+ ]]}
+
+ feed('<cr>')
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]]}
+ end)
end)