From 3a1a133982eb5eacc3ece208fa63d3b673d78c98 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 7 Jun 2026 22:35:17 +0200 Subject: [PATCH] Show a truncation notice when search hits the 1000-result cap The search already stopped accepting results at 1000 and cancelled the producer, but the user was never told the list had been truncated. Append the "Search aborted, more than 1000 results found" row (a no-op to click). Assisted-by: Claude:claude-opus-4-8:Claude Code --- ILSpy/Search/RunningSearch.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ILSpy/Search/RunningSearch.cs b/ILSpy/Search/RunningSearch.cs index c7a83efde..cd5f91650 100644 --- a/ILSpy/Search/RunningSearch.cs +++ b/ILSpy/Search/RunningSearch.cs @@ -220,6 +220,16 @@ namespace ILSpy.Search // Stop the producer — anything it pushes from here would just be // discarded, so why burn CPU on it. cts.Cancel(); + // Tell the user the list was truncated (appended after the sorted results; its + // null Reference makes it a no-op to click). + sink.Add(new SearchResult { + Name = ICSharpCode.ILSpy.Properties.Resources.SearchAbortedMoreThan1000ResultsFound, + Location = string.Empty, + Assembly = string.Empty, + Image = null!, + LocationImage = null!, + AssemblyImage = null!, + }); } // Drain-discard any items still queued: without this the termination // condition (runTask done + queue empty) never fires and the timer