Skip to content

Commit

Permalink
Merge pull request microsoft#234123 from microsoft/tyriar/233791
Browse files Browse the repository at this point in the history
Clip line numbers when rendering line content
  • Loading branch information
Tyriar authored Nov 18, 2024
2 parents 72120e6 + dc7556d commit 9dcdbb8
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 9dcdbb8

Please sign in to comment.