Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/browser/Decorations/OverviewRulerRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class OverviewRulerRenderer extends Disposable {
return;
}
this._ctx.lineWidth = 1;
this._ctx.fillStyle = decoration.options.overviewRulerOptions.color;
this._ctx.fillStyle = decoration.overviewRulerDecorationColor || decoration.options.overviewRulerOptions.color;
this._ctx.fillRect(
!decoration.options.overviewRulerOptions.position || decoration.options.overviewRulerOptions.position === 'left' ? 0 : decoration.options.overviewRulerOptions.position === 'right' ? renderSizes[SizeIndex.OUTER_SIZE] + renderSizes[SizeIndex.INNER_SIZE]: renderSizes[SizeIndex.OUTER_SIZE],
Math.round(this._canvas.height * (decoration.options.marker.line / this._bufferService.buffers.active.lines.length)),
Expand Down
2 changes: 2 additions & 0 deletions src/common/services/DecorationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class Decoration extends Disposable implements IInternalDecoration {
private _onDispose = this.register(new EventEmitter<void>());
public readonly onDispose = this._onDispose.event;

public overviewRulerDecorationColor: string | undefined;

constructor(
public readonly options: IDecorationOptions
) {
Expand Down
7 changes: 7 additions & 0 deletions typings/xterm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,13 @@ declare module 'xterm' {
* that.
*/
element: HTMLElement | undefined;

/**
* The color to be used for the overview ruler decoration.
* This will only take effect when @param overviewRulerOptions
* were provided initially.
*/
overviewRulerDecorationColor: string | undefined;
}

/*
Expand Down