aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorshirasaka <shirasaka@n-create.co.jp>2022-04-30 16:49:29 +0900
committershirasaka <shirasaka@n-create.co.jp>2022-05-05 06:15:09 +0900
commitb5957c3c3243c247bc5bec44e44cdaf8230a6c5d (patch)
treeee62724192234b65b1c49589e1f97b5733332e0e /test/functional/ui/messages_spec.lua
parente6c71574a07662c44b83c6cb07bf9b61bc06e136 (diff)
downloadrneovim-b5957c3c3243c247bc5bec44e44cdaf8230a6c5d.tar.gz
rneovim-b5957c3c3243c247bc5bec44e44cdaf8230a6c5d.tar.bz2
rneovim-b5957c3c3243c247bc5bec44e44cdaf8230a6c5d.zip
fix: display global statusline correctly with ext_messages
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua106
1 files changed, 106 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index abb0948c60..3320f53d86 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -12,6 +12,7 @@ local nvim_prog = helpers.nvim_prog
local iswin = helpers.iswin
local exc_exec = helpers.exc_exec
local exec_lua = helpers.exec_lua
+local poke_eventloop = helpers.poke_eventloop
describe('ui/ext_messages', function()
local screen
@@ -1111,6 +1112,8 @@ describe('ui/ext_messages', function()
[3] = {bold = true},
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
[5] = {foreground = Screen.colors.Blue1},
+ [6] = {reverse = true},
+ [7] = {bold = true, reverse = true},
})
end)
@@ -1202,6 +1205,109 @@ describe('ui/ext_messages', function()
{content = { { "Press ENTER or type command to continue", 4 } }, kind = "return_prompt" }
}}
end)
+
+ it('supports global statusline', function()
+ feed(":set laststatus=3<cr>")
+ feed(":sp<cr>")
+ feed("<c-l>")
+ feed(":set cmdheight<cr>")
+ screen:expect({grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {6:────────────────────────────────────────────────────────────────────────────────}|
+ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {7:[No Name] }|
+ ]], messages={
+ {content = { { " cmdheight=0" } }, kind = "" }
+ }})
+
+ feed("<c-w>+")
+ feed("<c-l>")
+ feed(":set cmdheight<cr>")
+ screen:expect({grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {6:────────────────────────────────────────────────────────────────────────────────}|
+ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {7:[No Name] }|
+ ]], messages={
+ {content = { { " cmdheight=0" } }, kind = "" }
+ }})
+
+ feed(":set mouse=a<cr>")
+ meths.input_mouse('left', 'press', '', 0, 12, 10)
+ poke_eventloop()
+ meths.input_mouse('left', 'drag', '', 0, 12, 10)
+ meths.input_mouse('left', 'drag', '', 0, 11, 10)
+ feed("<c-l>")
+ feed(":set cmdheight<cr>")
+ screen:expect({grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {6:────────────────────────────────────────────────────────────────────────────────}|
+ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {7:[No Name] }|
+ ]], messages={
+ {content = { { " cmdheight=0" } }, kind = "" }
+ }})
+ end)
end)
describe('ui/msg_puts_printf', function()