From e8aa4eba75522877af05799020b91b7b2829ab76 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Mon, 21 Mar 2022 15:36:39 -0400 Subject: [PATCH] IDecorationColor -> ISearchDecorationOptions --- addons/xterm-addon-search/src/SearchAddon.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/xterm-addon-search/src/SearchAddon.ts b/addons/xterm-addon-search/src/SearchAddon.ts index 6b84421d..bf4d6330 100644 --- a/addons/xterm-addon-search/src/SearchAddon.ts +++ b/addons/xterm-addon-search/src/SearchAddon.ts @@ -10,10 +10,10 @@ export interface ISearchOptions { wholeWord?: boolean; caseSensitive?: boolean; incremental?: boolean; - decorations?: IDecorationColor; + decorations?: ISearchDecorationOptions; } -interface IDecorationColor { +interface ISearchDecorationOptions { matchColor: string; selectedColor: string; } @@ -541,7 +541,7 @@ export class SearchAddon implements ITerminalAddon { * @param result The result to select. * @return Whether a result was selected. */ - private _selectResult(result: ISearchResult | undefined, decorations?: IDecorationColor): boolean { + private _selectResult(result: ISearchResult | undefined, decorations?: ISearchDecorationOptions): boolean { const terminal = this._terminal!; this._selectedDecoration?.dispose(); if (!result) { @@ -592,7 +592,7 @@ export class SearchAddon implements ITerminalAddon { * @param color the color to use for the decoration * @returns the {@link IDecoration} or undefined if the marker has already been disposed of */ - private _createResultDecoration(result: ISearchResult, decorations?: IDecorationColor): IDecoration | undefined { + private _createResultDecoration(result: ISearchResult, decorations?: ISearchDecorationOptions): IDecoration | undefined { const terminal = this._terminal!; const marker = terminal.registerMarker(-terminal.buffer.active.baseY - terminal.buffer.active.cursorY + result.row); if (!marker || !decorations?.matchColor) {