aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-03-09 13:38:32 -0700
committerGitHub <noreply@github.com>2025-03-09 13:38:32 -0700
commit25d3b92d071c77aec40f3e78d27537220fc68d70 (patch)
tree479b18b4e86c618300ab046f2f4813de36c4af0b /test/functional/ui/messages_spec.lua
parentd9585bdcfb5bc85c5a2f6fa5d211295c9c1011ea (diff)
parent124c655f56bcf31dfeaf91caee2e5f2fcbbfa089 (diff)
downloadrneovim-25d3b92d071c77aec40f3e78d27537220fc68d70.tar.gz
rneovim-25d3b92d071c77aec40f3e78d27537220fc68d70.tar.bz2
rneovim-25d3b92d071c77aec40f3e78d27537220fc68d70.zip
Merge #32687 "g<" for ext_messages
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 4770c5e143..a6577f3ca0 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -1571,6 +1571,48 @@ stack traceback:
end,
})
end)
+
+ it('g< mapping shows recent messages', function()
+ command('echo "foo" | echo "bar"')
+ local s1 = [[
+ ^ |
+ {1:~ }|*4
+ ]]
+ screen:expect({
+ grid = s1,
+ messages = {
+ {
+ content = { { 'bar' } },
+ history = false,
+ kind = 'echo',
+ },
+ },
+ })
+ feed(':messages<CR>g<lt>')
+ screen:expect({
+ grid = [[
+ ^ |
+ {1:~ }|*4
+ ]],
+ messages = {
+ {
+ content = { { 'Press ENTER or type command to continue', 6, 18 } },
+ history = false,
+ kind = 'return_prompt',
+ },
+ },
+ msg_history = {
+ {
+ content = { { 'foo' } },
+ kind = 'echo',
+ },
+ {
+ content = { { 'bar' } },
+ kind = 'echo',
+ },
+ },
+ })
+ end)
end)
describe('ui/builtin messages', function()