fix(addon-search): cancel pending highlight refresh on clear

Clear the debounced highlight timeout when decorations are cleared to
avoid stale delayed searches.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-05-25 17:42:22 -07:00
co-authored by Cursor
parent f28bfb7142
commit d99803293e
+1
View File
@@ -79,6 +79,7 @@ export class SearchAddon extends Disposable implements ITerminalAddon, ISearchAp
}
public clearDecorations(retainCachedSearchTerm?: boolean): void {
this._highlightTimeout.clear();
this._resultTracker.clearSelectedDecoration();
this._decorationManager?.clearHighlightDecorations();
this._resultTracker.clearResults();