Skip to content

Commit

Permalink
Use hlexists instead to avoid creating on v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MisanthropicBit committed Nov 27, 2024
1 parent a407325 commit af32036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/winmove/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ local function generate_highlights(mode, groups)
-- Create a new highlight group we can link to
hl_group = ("Winmove%sInternal%s"):format(titlecase_mode, hl_group)

if #compat.get_hl(global_ns_id, { name = hl_group, create = false }) == 0 then
if vim.fn.hlexists(hl_group) == 0 then
vim.api.nvim_set_hl(global_ns_id, hl_group, colors)
end
end
Expand Down

0 comments on commit af32036

Please sign in to comment.