counter revealLines-logic with sticky scroll max lines (#229939)

fixes https://github.com/microsoft/vscode/issues/229934
This commit is contained in:
Johannes Rieken
2024-09-27 11:48:08 +02:00
committed by GitHub
parent 0dea65fe0d
commit ded5e0d79e

View File

@@ -168,7 +168,9 @@ export class InlineChatZoneWidget extends ZoneWidget {
}
reveal(position: Position) {
this.editor.revealLinesInCenterIfOutsideViewport(position.lineNumber, position.lineNumber, ScrollType.Immediate);
const stickyScroll = this.editor.getOption(EditorOption.stickyScroll);
const magicValue = stickyScroll.enabled ? stickyScroll.maxLineCount : 0;
this.editor.revealLines(position.lineNumber + magicValue, position.lineNumber + magicValue, ScrollType.Immediate);
this._scrollUp.reset();
this.updatePositionAndHeight(position);
}