From 942f26279d373fcdebcb41363e526a2871b09a71 Mon Sep 17 00:00:00 2001 From: bfredl Date: Sun, 27 Nov 2022 10:33:54 +0100 Subject: fix(tests): only get the color map once, even for multiple test files Problem: test/functional/ui/screen.lua would be reloaded for each *_spec.lua file, which causes an extra nvim session to be started to get the color map each time. solution: Mark screen.lua as a preloaded file, but defer the loading of the color map to the first time Screen object is initialised. --- test/functional/ui/highlight_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/ui/highlight_spec.lua') diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index bcb437a55d..8dd1091353 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -1403,7 +1403,7 @@ describe('ColorColumn highlight', function() before_each(function() clear() screen = Screen.new(40, 15) - Screen:set_default_attr_ids({ + screen:set_default_attr_ids({ [1] = {background = Screen.colors.LightRed}, -- ColorColumn [2] = {background = Screen.colors.Grey90}, -- CursorLine [3] = {foreground = Screen.colors.Brown}, -- LineNr -- cgit