Skip to content

Commit

Permalink
Handle setting highlight on v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MisanthropicBit committed Nov 28, 2024
1 parent af32036 commit 1bd81b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/winmove/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ 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 vim.fn.hlexists(hl_group) == 0 then
-- nvim_get_hl creates the highlight group if it does not exist on <= v0.9.0
if not compat.has("nvim-0.10.0") or 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 1bd81b2

Please sign in to comment.