mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Improve setting names
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user