Skip to content

Commit

Permalink
fix: set --color via fzf_opts directly (closes #1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Feb 21, 2024
1 parent d8643f1 commit 3e481c9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/fzf-lua/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,13 @@ M.create_fzf_colors = function(opts)
if type(colors) == "function" then
colors = colors(opts)
end
if not colors then return end

local tbl = {}
for highlight, list in pairs(colors) do

-- In case the user alredy set fzf_opts["--color"] (#1052)
table.insert(tbl, opts.fzf_opts and opts.fzf_opts["--color"])

for highlight, list in pairs(colors or {}) do
if type(list) == "table" then
local hexcol = utils.hexcol_from_hl(list[2], list[1])
if hexcol and #hexcol > 0 then
Expand Down

0 comments on commit 3e481c9

Please sign in to comment.