Skip to content

Commit

Permalink
Clip line numbers when rendering line content
Browse files Browse the repository at this point in the history
Fixes #233791
  • Loading branch information
Tyriar committed Nov 18, 2024
1 parent 0557387 commit 61f6a6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ export class ViewLinesGpu extends ViewPart implements IViewLines {
pass.setPipeline(this._pipeline);
pass.setVertexBuffer(0, this._vertexBuffer);

// Only draw the content area
const contentLeft = Math.ceil(this._contentLeftObs.get() * this._viewGpuContext.devicePixelRatio.get());
pass.setScissorRect(contentLeft, 0, this.canvas.width - contentLeft, this.canvas.height);

pass.setBindGroup(0, this._bindGroup);

if (this._renderStrategy?.draw) {
Expand Down

0 comments on commit 61f6a6c

Please sign in to comment.