Skip to content

Commit

Permalink
fix(color): ensure values exist when setting colors
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsho committed Mar 31, 2023
1 parent 4078be3 commit bdd6365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/flutter-tools/lsp/color/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ local CLIENT_NS = api.nvim_create_namespace("flutter_tools_lsp_document_color")
local function create_set_hl(prefix, opts)
local hlname = prefix .. (opts.background or "") .. (opts.foreground or "")
api.nvim_set_hl(0, hlname, {
background = "#" .. opts.background,
foreground = "#" .. opts.foreground,
background = opts.background and "#" .. opts.background or nil,
foreground = opts.foreground and "#" .. opts.foreground or nil,
})
return hlname
end
Expand Down

0 comments on commit bdd6365

Please sign in to comment.