From 7b8914017c8b3ce86db332583516133b54baab21 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 19 Jun 2026 19:28:45 +0100 Subject: [PATCH] fix(search): drop redundant truncation prose when cursor present When a pagination cursor footer is emitted it already reports the remaining count; the separate '(truncated, showing subset of N)' prose line duplicated that signal. Suppress the prose line when CursorLine is set; keep it for non-paginated truncation. --- internal/search/search.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/search/search.go b/internal/search/search.go index 378aae5..85eaf6a 100644 --- a/internal/search/search.go +++ b/internal/search/search.go @@ -394,7 +394,9 @@ func (s *Searcher) FormatResultsWithOptions(results *SearchResults, opts FormatO fmt.Fprintf(&sb, " (truncated, total: %d)", results.Total) } sb.WriteString(":\n\n") - } else if results.Truncated { + } else if results.Truncated && opts.CursorLine == "" { + // When a cursor footer is present it already reports the remaining count, + // so the prose truncation line would be redundant. fmt.Fprintf(&sb, "(truncated, showing subset of %d total matches)\n\n", results.Total) }