@@ -559,5 +559,7 @@ function addOverviewRuler() {
|
|||||||
term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#ef2929', position: 'left' }});
|
term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#ef2929', position: 'left' }});
|
||||||
term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#8ae234', position: 'center' }});
|
term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#8ae234', position: 'center' }});
|
||||||
term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#729fcf', position: 'right' }});
|
term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#729fcf', position: 'right' }});
|
||||||
|
term.registerDecoration({marker: term.addMarker(10), overviewRulerOptions: { color: '#8ae234', position: 'center' }});
|
||||||
|
term.registerDecoration({marker: term.addMarker(10), overviewRulerOptions: { color: '#ffffff80', position: 'full' }});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,10 @@ export class OverviewRulerRenderer extends Disposable {
|
|||||||
this._ctx.fillStyle = decoration.options.overviewRulerOptions.color;
|
this._ctx.fillStyle = decoration.options.overviewRulerOptions.color;
|
||||||
this._ctx.fillRect(
|
this._ctx.fillRect(
|
||||||
/* x */ drawX[decoration.options.overviewRulerOptions.position!],
|
/* x */ drawX[decoration.options.overviewRulerOptions.position!],
|
||||||
/* y */ Math.round(this._canvas.height * (decoration.options.marker.line / this._bufferService.buffers.active.lines.length)),
|
/* y */ Math.round(
|
||||||
|
(this._canvas.height - 1) * // -1 to ensure at least 2px are allowed for decoration on last line
|
||||||
|
(decoration.options.marker.line / this._bufferService.buffers.active.lines.length) - drawHeight[decoration.options.overviewRulerOptions.position!] / 2
|
||||||
|
),
|
||||||
/* w */ drawWidth[decoration.options.overviewRulerOptions.position!],
|
/* w */ drawWidth[decoration.options.overviewRulerOptions.position!],
|
||||||
/* h */ drawHeight[decoration.options.overviewRulerOptions.position!]
|
/* h */ drawHeight[decoration.options.overviewRulerOptions.position!]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user