Skip to content

Commit 828dd97

Browse files
committed
1 parent 41f0ff1 commit 828dd97

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,11 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
395395

396396
// Reveal the line above or below the zone widget, to get the zone widget in the viewport
397397
const revealLineNumber = Math.min(this.editor.getModel().getLineCount(), Math.max(1, where.endLineNumber + 1));
398-
this.editor.revealLineInCenterIfOutsideViewport(revealLineNumber, ScrollType.Smooth);
398+
this.revealLine(revealLineNumber);
399+
}
400+
401+
protected revealLine(lineNumber: number) {
402+
this.editor.revealLine(lineNumber, ScrollType.Smooth);
399403
}
400404

401405
protected setCssClass(className: string, classToReplace?: string): void {

src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ class DirtyDiffWidget extends PeekViewWidget {
315315
secondaryHeadingColor: theme.getColor(peekViewTitleInfoForeground)
316316
});
317317
}
318+
319+
protected revealLine(lineNumber: number) {
320+
this.editor.revealLineInCenterIfOutsideViewport(lineNumber, ScrollType.Smooth);
321+
}
318322
}
319323

320324
@editorAction

0 commit comments

Comments
 (0)