fix(lazygit): not needed to use deprecated fallback for set_hl

This commit is contained in:
Folke Lemaitre 2024-11-14 09:12:27 +01:00
parent f29c5865a8
commit 14f076e039
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -96,9 +96,7 @@ local function get_color(v)
for _, c in ipairs({ "fg", "bg" }) do
if v[c] then
local name = v[c]
local hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = name, link = false })
or vim.api.nvim_get_hl_by_name(name, true)
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
local hl_color ---@type number?
if c == "fg" then
hl_color = hl and hl.fg or hl.foreground