Skip to content

Commit

Permalink
Merge pull request #233923 from microsoft/tyriar/233797
Browse files Browse the repository at this point in the history
Fix roundedSelection when line rendering is mixed
  • Loading branch information
Tyriar authored Nov 15, 2024
2 parents 78742c4 + 6df9a97 commit ab41c45
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/vs/editor/browser/view/renderingContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,13 @@ export class RenderingContext extends RestrictedRenderingContext {
return domRanges ?? null;
}
const gpuRanges = this._viewLinesGpu.linesVisibleRangesForRange(range, includeNewLines);
if (!domRanges && !gpuRanges) {
return null;
}
const ranges = [];
if (domRanges) {
ranges.push(...domRanges);
if (!domRanges) {
return gpuRanges;
}
if (gpuRanges) {
ranges.push(...gpuRanges);
if (!gpuRanges) {
return domRanges;
}
return ranges;
return domRanges.concat(gpuRanges).sort((a, b) => a.lineNumber - b.lineNumber);
}

public visibleRangeForPosition(position: Position): HorizontalPosition | null {
Expand Down

0 comments on commit ab41c45

Please sign in to comment.