aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/screen.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-12-22 13:21:57 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2024-12-23 00:37:28 +0100
commita10636fbe7bb4dba45c42c64548e5e32fe8f8d12 (patch)
treea6fb8278c199c9c94a75e60419ad3700f33e00d1 /test/functional/ui/screen.lua
parent394f69a25dc32c5b101ba2d34ac6376b0c75b2a2 (diff)
downloadrneovim-a10636fbe7bb4dba45c42c64548e5e32fe8f8d12.tar.gz
rneovim-a10636fbe7bb4dba45c42c64548e5e32fe8f8d12.tar.bz2
rneovim-a10636fbe7bb4dba45c42c64548e5e32fe8f8d12.zip
feat(ui): specify whether msg_show event is added to history
Pass along whether message in msg_show event is added to the internal :messages history.
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r--test/functional/ui/screen.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 8c050195ee..6a8e7df6a0 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -1369,12 +1369,12 @@ function Screen:_handle_wildmenu_hide()
self.wildmenu_items, self.wildmenu_pos = nil, nil
end
-function Screen:_handle_msg_show(kind, chunks, replace_last)
+function Screen:_handle_msg_show(kind, chunks, replace_last, history)
local pos = #self.messages
if not replace_last or pos == 0 then
pos = pos + 1
end
- self.messages[pos] = { kind = kind, content = chunks }
+ self.messages[pos] = { kind = kind, content = chunks, history = history }
end
function Screen:_handle_msg_clear()
@@ -1490,7 +1490,11 @@ function Screen:_extstate_repr(attr_state)
local messages = {}
for i, entry in ipairs(self.messages) do
- messages[i] = { kind = entry.kind, content = self:_chunks_repr(entry.content, attr_state) }
+ messages[i] = {
+ kind = entry.kind,
+ content = self:_chunks_repr(entry.content, attr_state),
+ history = entry.history,
+ }
end
local msg_history = {}