From e98b6315e400f6f3c43595131a403c5063be07d3 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Wed, 13 Apr 2022 11:19:22 -0700 Subject: [PATCH] always update overview ruler decorations (#3733) --- addons/xterm-addon-search/src/SearchAddon.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/xterm-addon-search/src/SearchAddon.ts b/addons/xterm-addon-search/src/SearchAddon.ts index 0192532ce9..41fd19b9bd 100644 --- a/addons/xterm-addon-search/src/SearchAddon.ts +++ b/addons/xterm-addon-search/src/SearchAddon.ts @@ -51,7 +51,6 @@ const LINES_CACHE_TIME_TO_LIVE = 15 * 1000; // 15 secs export class SearchAddon implements ITerminalAddon { private _terminal: Terminal | undefined; - private _dataChanged: boolean = false; private _cachedSearchTerm: string | undefined; private _selectedDecoration: IDecoration | undefined; private _resultDecorations: Map | undefined; @@ -77,7 +76,6 @@ export class SearchAddon implements ITerminalAddon { public activate(terminal: Terminal): void { this._terminal = terminal; this._onDataDisposable = this._terminal.onData(() => { - this._dataChanged = true; if (this._highlightTimeout) { window.clearTimeout(this._highlightTimeout); } @@ -106,7 +104,6 @@ export class SearchAddon implements ITerminalAddon { this._cachedSearchTerm = undefined; this._searchResults = undefined; this._resultDecorations = undefined; - this._dataChanged = true; this._resultIndex = undefined; } @@ -169,9 +166,6 @@ export class SearchAddon implements ITerminalAddon { resultDecorations.set(resultDecoration.marker.line, decorationsForLine); } }); - if (this._dataChanged) { - this._dataChanged = false; - } if (this._searchResults.size > 0) { this._cachedSearchTerm = term; } @@ -710,7 +704,7 @@ export class SearchAddon implements ITerminalAddon { marker, x: result.col, width: result.size, - overviewRulerOptions: this._resultDecorations?.get(marker.line) && !this._dataChanged ? undefined : { + overviewRulerOptions: this._resultDecorations?.get(marker.line) ? undefined : { color: decorations.matchOverviewRuler, position: 'center' } });