From f9deb2f8409de532c9ed4e10004c1f0830be6c3d Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:34:48 -0700 Subject: [PATCH] Don't set overview ruler width when using find An embedder may not want to enable it --- addons/xterm-addon-search/src/SearchAddon.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/xterm-addon-search/src/SearchAddon.ts b/addons/xterm-addon-search/src/SearchAddon.ts index c3fc3ecc..12e82103 100644 --- a/addons/xterm-addon-search/src/SearchAddon.ts +++ b/addons/xterm-addon-search/src/SearchAddon.ts @@ -92,7 +92,6 @@ export class SearchAddon implements ITerminalAddon { private _disposeDecorations(): void { this._resultDecorations.forEach(decorations => { for (const d of decorations) { - console.log('dispose', d); d.dispose(); } }); @@ -138,9 +137,6 @@ export class SearchAddon implements ITerminalAddon { this._searchResults.set(`${result.row}-${result.col}`, result); result = this._find(term, result.row, result.col + 1, searchOptions); } - if (!this._terminal.options.overviewRulerWidth) { - this._terminal.options.overviewRulerWidth = 10; - } this._searchResults.forEach(result => { const resultDecoration = this._createResultDecoration(result, searchOptions.decorations!); if (resultDecoration) { @@ -644,7 +640,6 @@ export class SearchAddon implements ITerminalAddon { if (!marker || !decorations?.matchColor) { return undefined; } - const findResultDecoration = terminal.registerDecoration( { marker, overviewRulerOptions: this._resultDecorations.get(marker.line) && !this._dataChanged ? undefined : { color: decorations.matchColor, position: 'center' }