Skip to content

Commit 70cdea3

Browse files
phanenibhagwan
authored andcommitted
fix: append fzf_opts.--color
1 parent f6a570c commit 70cdea3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lua/fzf-lua/core.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,10 @@ end
498498

499499
-- Create fzf --color arguments from a table of vim highlight groups.
500500
M.create_fzf_colors = function(opts)
501+
-- In case the user already set fzf_opts["--color"] (#1052)
502+
if opts.fzf_opts and type(opts.fzf_opts["--color"]) == "string" then
503+
table.insert(opts._fzf_cli_args, "--color=" .. opts.fzf_opts["--color"])
504+
end
501505
if type(opts.fzf_colors) ~= "table" then return end
502506
local colors = opts.fzf_colors
503507

@@ -515,11 +519,6 @@ M.create_fzf_colors = function(opts)
515519

516520
local tbl = {}
517521

518-
-- In case the user already set fzf_opts["--color"] (#1052)
519-
if opts.fzf_colors and type(opts.fzf_colors["--color"]) == "string" then
520-
table.insert(tbl, opts.fzf_opts["--color"])
521-
end
522-
523522
for flag, list in pairs(colors) do
524523
if type(list) == "table" then
525524
local spec = {}

0 commit comments

Comments
 (0)