mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(util): color() should not create hl groups
This commit is contained in:
parent
3a8ecf5912
commit
17033e67ef
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ function M.color(group, prop)
|
|||
group = type(group) == "table" and group or { group }
|
||||
---@cast group string[]
|
||||
for _, g in ipairs(group) do
|
||||
local hl = vim.api.nvim_get_hl(0, { name = g, link = false })
|
||||
local hl = vim.api.nvim_get_hl(0, { name = g, link = false, create = false })
|
||||
if hl[prop] then
|
||||
return string.format("#%06x", hl[prop])
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue