Skip to content

Commit 1dbc1bf

Browse files
authored
Merge pull request #4516 from jeanp413/jp/fix-decoration-render-layer
Ensure decorations in the top layer render on top of decorations in the bottom layer
2 parents 6e8c59f + ec227c7 commit 1dbc1bf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

css/xterm.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,12 @@
179179
position: absolute;
180180
}
181181

182+
.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
183+
z-index: 7;
184+
}
185+
182186
.xterm-decoration-overview-ruler {
183-
z-index: 7;
187+
z-index: 8;
184188
position: absolute;
185189
top: 0;
186190
right: 0;

src/browser/decorations/BufferDecorationRenderer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export class BufferDecorationRenderer extends Disposable {
7272
private _createElement(decoration: IInternalDecoration): HTMLElement {
7373
const element = document.createElement('div');
7474
element.classList.add('xterm-decoration');
75+
element.classList.toggle('xterm-decoration-top-layer', decoration?.options?.layer === 'top');
7576
element.style.width = `${Math.round((decoration.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`;
7677
element.style.height = `${(decoration.options.height || 1) * this._renderService.dimensions.css.cell.height}px`;
7778
element.style.top = `${(decoration.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height}px`;

0 commit comments

Comments
 (0)