From 9c6a3703bb15d56fecdd962512f69f0ccf6d398c Mon Sep 17 00:00:00 2001 From: Tomasz N Date: Mon, 16 Dec 2024 12:07:27 +0100 Subject: 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. --- test/functional/ui/messages_spec.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'test/functional/ui/messages_spec.lua') diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index e5316f264b..2c1297b768 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -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('') + screen:expect({ + grid = [[ + line 1 | + line^ | + {1:~ }|*3 + ]], + messages = { + { + content = { { 'Already at newest change' } }, + kind = 'undo', + }, + }, + }) end) it(':echoerr', function() -- cgit