Improve setting names

This commit is contained in:
Daniel Imms
2022-03-23 15:09:35 -07:00
parent 23ed3327ce
commit b55c7e342a
3 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -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());
}
}
+6 -6
View File
@@ -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
View File
@@ -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
};
}