From 3862ae26ccebde27c39041fd7aa3e92cdf36abe9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 08:47:56 +0000 Subject: [PATCH] Fix fuzzy match highlighting in choose_files kitten Fixes #9693 --- kittens/choose_files/results.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kittens/choose_files/results.go b/kittens/choose_files/results.go index 1b6ea56a6..840cfd14c 100644 --- a/kittens/choose_files/results.go +++ b/kittens/choose_files/results.go @@ -112,12 +112,10 @@ func (h *Handler) render_match_with_positions(text string, add_ellipsis bool, po for chunk := range split_up_text(text, add_ellipsis, positions) { if chunk.text != "" { if chunk.emphasize { - h.lp.QueueWriteString(prefix) - defer func() { - h.lp.QueueWriteString(suffix) - }() + h.lp.QueueWriteString(prefix + chunk.text + suffix) + } else { + h.lp.QueueWriteString(chunk.text) } - h.lp.QueueWriteString(chunk.text) } } }