Skip to content

Commit

Permalink
fix: only return highlights that do highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 17, 2024
1 parent 3346244 commit ce53a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/astroui/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ end
---@param fallback? table The fallback highlight properties
---@return table properties # the highlight group properties
function M.get_hlgroup(name, fallback)
if vim.fn.hlexists(name) == 1 then
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
local hl = vim.api.nvim_get_hl(0, { name = name, link = false, create = false })
if not vim.tbl_isempty(hl) then
if not hl.fg then hl.fg = "NONE" end
if not hl.bg then hl.bg = "NONE" end
if hl.reverse then
Expand Down

0 comments on commit ce53a09

Please sign in to comment.