diff --git a/addons/xterm-addon-search/src/SearchAddon.ts b/addons/xterm-addon-search/src/SearchAddon.ts index 8ce92bf2..d8b5a17e 100644 --- a/addons/xterm-addon-search/src/SearchAddon.ts +++ b/addons/xterm-addon-search/src/SearchAddon.ts @@ -17,9 +17,9 @@ interface ISearchDecorationOptions { matchBackground?: string; matchBorder?: string; matchOverviewRuler: string; - selectedBackground?: string; - selectedBorder?: string; - selectedColorOverviewRuler: string; + activeMatchBackground?: string; + activeMatchBorder?: string; + activeMatchColorOverviewRuler: string; } export interface ISearchPosition { @@ -605,16 +605,16 @@ export class SearchAddon implements ITerminalAddon { return false; } terminal.select(result.col, result.row, result.size); - if (decorations?.selectedColorOverviewRuler) { + if (decorations?.activeMatchColorOverviewRuler) { const marker = terminal.registerMarker(-terminal.buffer.active.baseY - terminal.buffer.active.cursorY + result.row); if (marker) { this._selectedDecoration = terminal.registerDecoration({ marker, overviewRulerOptions: { - color: decorations.selectedColorOverviewRuler + color: decorations.activeMatchColorOverviewRuler } }); - this._selectedDecoration?.onRender((e) => this._applyStyles(e, decorations.selectedBackground, decorations.selectedBorder, result)); + this._selectedDecoration?.onRender((e) => this._applyStyles(e, decorations.activeMatchBackground, decorations.activeMatchBorder, result)); this._selectedDecoration?.onDispose(() => marker.dispose()); } } diff --git a/addons/xterm-addon-search/typings/xterm-addon-search.d.ts b/addons/xterm-addon-search/typings/xterm-addon-search.d.ts index ab5e9321..aedb6af9 100644 --- a/addons/xterm-addon-search/typings/xterm-addon-search.d.ts +++ b/addons/xterm-addon-search/typings/xterm-addon-search.d.ts @@ -60,19 +60,19 @@ declare module 'xterm-addon-search' { matchOverviewRuler: string; /** - * The background color for the currently selected match. + * The background color for the currently active match. */ - selectedBackground?: string; + activeMatchBackground?: string; /** - * The border color of the currently selected match. + * The border color of the currently active match. */ - selectedBorder?: string; + activeMatchBorder?: string; /** - * The overview ruler color of the currently selected match. + * The overview ruler color of the currently active match. */ - selectedColorOverviewRuler: string; + activeMatchColorOverviewRuler: string; } /** diff --git a/demo/client.ts b/demo/client.ts index 5c669db3..55ff8d62 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -113,9 +113,9 @@ function getSearchOptions(e: KeyboardEvent): ISearchOptions { matchBackground: '#55575380', matchBorder: '#555753', matchOverviewRuler: '#555753', - selectedBackground: '#ef292980', - selectedBorder: '#ef2929', - selectedColorOverviewRuler: '#ef2929' + activeMatchBackground: '#ef292980', + activeMatchBorder: '#ef2929', + activeMatchColorOverviewRuler: '#ef2929' } : undefined }; }