revert row register marker changes

This commit is contained in:
meganrogge
2022-03-18 15:38:31 -04:00
parent 61c2ca71d8
commit fef30bdba4
5 changed files with 7 additions and 14 deletions
+2 -2
View File
@@ -547,7 +547,7 @@ export class SearchAddon implements ITerminalAddon {
}
terminal.select(result.col, result.row, result.size);
if (color) {
const marker = terminal.registerMarker(undefined, result.row);
const marker = terminal.registerMarker(-terminal.buffer.active.baseY - terminal.buffer.active.cursorY + result.row);
if (marker) {
this._selectedDecoration = terminal.registerDecoration({ marker, overviewRulerOptions: { color } });
this._selectedDecoration?.onRender((e) => this._applyStyles(e, color, result));
@@ -591,7 +591,7 @@ export class SearchAddon implements ITerminalAddon {
*/
private _createResultDecoration(result: ISearchResult, color: string): IDecoration | undefined {
const terminal = this._terminal!;
const marker = terminal.registerMarker(undefined, result.row);
const marker = terminal.registerMarker(-terminal.buffer.active.baseY - terminal.buffer.active.cursorY + result.row);
if (!marker) {
return undefined;
}