Skip to content

Commit 7f08f95

Browse files
authored
Merge pull request #284452 from microsoft/benibenj/handsome-leopard
Fix notebooks gutter indicator arrow not showing
2 parents f34aaea + c677363 commit 7f08f95

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,17 +363,17 @@ export class InlineEditsGutterIndicator extends Disposable {
363363
if (pillIsFullyDocked) {
364364
const pillRect = pillFullyDockedRect;
365365

366-
let lineNumberWidth;
366+
let widthUntilLineNumberEnd;
367367
if (layout.lineNumbersWidth === 0) {
368-
lineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconAreaWidth);
368+
widthUntilLineNumberEnd = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconAreaWidth);
369369
} else {
370-
lineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);
370+
widthUntilLineNumberEnd = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);
371371
}
372372

373-
const lineNumberRect = pillRect.withWidth(lineNumberWidth);
373+
const lineNumberRect = pillRect.withWidth(widthUntilLineNumberEnd);
374374
const minimalIconWidthWithPadding = CODICON_SIZE_PX + CODICON_PADDING_PX;
375-
const iconWidth = Math.min(layout.decorationsWidth, idealIconAreaWidth);
376-
const iconRect = pillRect.withWidth(Math.max(iconWidth, minimalIconWidthWithPadding)).translateX(lineNumberWidth);
375+
const iconWidth = Math.min(pillRect.width - widthUntilLineNumberEnd, idealIconAreaWidth);
376+
const iconRect = pillRect.withWidth(Math.max(iconWidth, minimalIconWidthWithPadding)).translateX(widthUntilLineNumberEnd);
377377
const iconVisible = iconWidth >= minimalIconWidthWithPadding;
378378

379379
return {

0 commit comments

Comments
 (0)