aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/ui_event_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-01-22 23:13:40 +0100
committerluukvbaal <luukvbaal@gmail.com>2025-01-24 11:39:39 +0100
commitd98827b634af29d74079d1848dd5e8c5d2be1233 (patch)
treed9f53ce1424d5cdb722d9dec322181753eaf95e1 /test/functional/lua/ui_event_spec.lua
parent0fd4ef5da7448fa3449643b23d6aa3af1640efe8 (diff)
downloadrneovim-d98827b634af29d74079d1848dd5e8c5d2be1233.tar.gz
rneovim-d98827b634af29d74079d1848dd5e8c5d2be1233.tar.bz2
rneovim-d98827b634af29d74079d1848dd5e8c5d2be1233.zip
fix(messages): avoid empty msg_showmode with 'noshowmode'
Diffstat (limited to 'test/functional/lua/ui_event_spec.lua')
-rw-r--r--test/functional/lua/ui_event_spec.lua63
1 files changed, 33 insertions, 30 deletions
diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua
index c6f98c8640..8bfd574fb9 100644
--- a/test/functional/lua/ui_event_spec.lua
+++ b/test/functional/lua/ui_event_spec.lua
@@ -345,31 +345,36 @@ describe('vim.ui_attach', function()
vim.api.nvim_buf_set_lines(0, -2, -1, false, { err[1] })
end)
]])
+ local s1 = [[
+ ^ |
+ {1:~ }|*4
+ ]]
+ screen:expect(s1)
+ feed('QQQQQQ<CR>')
screen:expect({
grid = [[
- ^ |
- {1:~ }|*4
- ]],
- })
- feed('ifoo')
- screen:expect({
- grid = [[
- foo^ |
- {1:~ }|*4
- ]],
- showmode = { { '-- INSERT --', 5, 11 } },
- })
- feed('<esc>:1mes clear<cr>:mes<cr>')
- screen:expect({
- grid = [[
- foo |
- {3: }|
- {9:Excessive errors in vim.ui_attach() call}|
- {9:back from ns: 1.} |
+ {9:obal 'err' (a nil value)} |
+ {9:stack traceback:} |
+ {9: [string "<nvim>"]:2: in function}|
+ {9: <[string "<nvim>"]:1>} |
{100:Press ENTER or type command to continue}^ |
]],
- cmdline = { { abort = false } },
+ messages = {
+ {
+ content = { { 'Press ENTER or type command to continue', 100, 18 } },
+ history = true,
+ kind = 'return_prompt',
+ },
+ },
})
+ feed(':1mes clear<CR>:mes<CR>')
+ screen:expect([[
+ |
+ {3: }|
+ {9:Excessive errors in vim.ui_attach() call}|
+ {9:back from ns: 1.} |
+ {100:Press ENTER or type command to continue}^ |
+ ]])
feed('<cr>')
-- Also when scheduled
exec_lua([[
@@ -378,7 +383,7 @@ describe('vim.ui_attach', function()
end)
]])
screen:expect({
- any = 'fo^o',
+ grid = s1,
messages = {
{
content = {
@@ -410,14 +415,12 @@ describe('vim.ui_attach', function()
},
})
feed('<esc>:1mes clear<cr>:mes<cr>')
- screen:expect({
- grid = [[
- foo |
- {3: }|
- {9:Excessive errors in vim.ui_attach() call}|
- {9:back from ns: 2.} |
- {100:Press ENTER or type command to continue}^ |
- ]],
- })
+ screen:expect([[
+ |
+ {3: }|
+ {9:Excessive errors in vim.ui_attach() call}|
+ {9:back from ns: 2.} |
+ {100:Press ENTER or type command to continue}^ |
+ ]])
end)
end)