fix(messages): no message kind for :undo messages #31590

Problem: cannot handle `:undo` and `:redo` messages in a special way,
e.g. replace one by another.

Solution: add `undo` kind.
This commit is contained in:
Tomasz N
2024-12-16 12:07:27 +01:00
committed by GitHub
parent 01a97d2ad7
commit 9c6a3703bb
3 changed files with 32 additions and 0 deletions

View File

@@ -240,6 +240,36 @@ describe('ui/ext_messages', function()
},
},
})
-- undo
feed('uu')
screen:expect({
grid = [[
^ |
{1:~ }|*4
]],
messages = {
{
content = { { 'Already at oldest change' } },
kind = 'undo',
},
},
})
feed('<C-r><C-r><C-r>')
screen:expect({
grid = [[
line 1 |
line^ |
{1:~ }|*3
]],
messages = {
{
content = { { 'Already at newest change' } },
kind = 'undo',
},
},
})
end)
it(':echoerr', function()