More more logic out of the loop

This commit is contained in:
Iron_E 2020-07-16 09:29:39 -04:00
parent 5e5b33165d
commit ad9c11755b
No known key found for this signature in database
GPG Key ID: B0B37DE7EDC2335F
1 changed files with 3 additions and 5 deletions

View File

@ -50,12 +50,10 @@ end or function(command, attributes) command[#command + 1] =
end end
-- This function appends `selected_attributes` to the end of `highlight_cmd`. -- This function appends `selected_attributes` to the end of `highlight_cmd`.
local function stylize(command, attributes) local stylize = use_hex_and_256 and function(command, attributes)
command[#command + 1] = ' cterm='..attributes..' gui='..attributes
end or function(command, attributes)
command[#command + 1] = ' cterm='..attributes command[#command + 1] = ' cterm='..attributes
if use_hex_and_256 then -- we're using hex populate the gui* attributes.
command[#command + 1] = ' gui='..attributes
end
end end
-- Generate a `:highlight` command from a group and some attributes. -- Generate a `:highlight` command from a group and some attributes.