mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test/ui: add redraw debug util
This commit is contained in:
parent
a5561fe610
commit
e5c4c4bca2
@ -456,6 +456,24 @@ end
|
|||||||
function Screen:snapshot_util(attrs, ignore)
|
function Screen:snapshot_util(attrs, ignore)
|
||||||
-- util to generate screen test
|
-- util to generate screen test
|
||||||
pcall(function() self:wait(function() return "error" end, 250) end)
|
pcall(function() self:wait(function() return "error" end, 250) end)
|
||||||
|
self:print_snapshot(attrs, ignore)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Screen:redraw_debug(attrs, ignore)
|
||||||
|
self:print_snapshot(attrs, ignore)
|
||||||
|
local function notification_cb(method, args)
|
||||||
|
assert(method == 'redraw')
|
||||||
|
for _, update in ipairs(args) do
|
||||||
|
print(require('inspect')(update))
|
||||||
|
end
|
||||||
|
self:_redraw(args)
|
||||||
|
self:print_snapshot(attrs, ignore)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
run(nil, notification_cb, nil, 250)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Screen:print_snapshot(attrs, ignore)
|
||||||
if ignore == nil then
|
if ignore == nil then
|
||||||
ignore = self._default_attr_ignore
|
ignore = self._default_attr_ignore
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user