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.
This commit is contained in:
2026-06-20 00:33:31 +01:00
parent 5827290ece
commit 7b8914017c
+3 -1
View File
@@ -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)
}