Skip to content

Commit 9953131

Browse files
committed
counter revealLines-logic with sticky scroll max lines
fixes microsoft#229934
1 parent 3d6f6d2 commit 9953131

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ export class InlineChatZoneWidget extends ZoneWidget {
168168
}
169169

170170
reveal(position: Position) {
171-
this.editor.revealLinesInCenterIfOutsideViewport(position.lineNumber, position.lineNumber, ScrollType.Immediate);
171+
const stickyScroll = this.editor.getOption(EditorOption.stickyScroll);
172+
const magicValue = stickyScroll.enabled ? stickyScroll.maxLineCount : 0;
173+
this.editor.revealLines(position.lineNumber + magicValue, position.lineNumber + magicValue, ScrollType.Immediate);
172174
this._scrollUp.reset();
173175
this.updatePositionAndHeight(position);
174176
}

0 commit comments

Comments
 (0)