Fix fzf-lua ansi_from_hl compatibility

Wrap the highlighted segment render path so forge only consumes the first return value from fzf-lua's ansi_from_hl helper, and add a regression spec covering the newer two-value return shape.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Harivansh Rathi 2026-03-28 21:23:59 -04:00
parent 09463c08b7
commit f3f66ae560
2 changed files with 52 additions and 1 deletions

View file

@ -23,7 +23,7 @@ local function render(segments)
local parts = {}
for _, seg in ipairs(segments) do
if seg[2] then
table.insert(parts, utils.ansi_from_hl(seg[2], seg[1]))
table.insert(parts, (utils.ansi_from_hl(seg[2], seg[1])))
else
table.insert(parts, seg[1])
end