From 399eb49bafcbd4bf60ff32e339a1f673e75acf2b Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Fri, 21 Jun 2019 10:00:35 +0200 Subject: highlight: show "hi Group" message correctly when not using the screen ext_message doesn't set msg_col. Add a space and let client deal with wrapping. When using silent redirect show the unwrapped message form. Removed check is already part of msg_advance() --- test/functional/ui/screen.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/functional/ui/screen.lua') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 0367e85028..f1254b68f6 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -1194,6 +1194,10 @@ function Screen:render(headers, attr_state, preview) return rv end +local remove_all_metatables = function(item, path) + if path[#path] ~= inspect.METATABLE then return item end +end + function Screen:print_snapshot(attrs, ignore) attrs = attrs or self._default_attr_ids if ignore == nil then @@ -1247,8 +1251,8 @@ function Screen:print_snapshot(attrs, ignore) io.stdout:write( "]]"..attrstr) for _, k in ipairs(ext_keys) do if ext_state[k] ~= nil then - -- TODO(bfredl): improve formating, remove ext metatables - io.stdout:write(", "..k.."="..inspect(ext_state[k])) + -- TODO(bfredl): improve formatting + io.stdout:write(", "..k.."="..inspect(ext_state[k],{process=remove_all_metatables})) end end print((keys and "}" or ")").."\n") -- cgit