mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
counter revealLines-logic with sticky scroll max lines (#229939)
fixes https://github.com/microsoft/vscode/issues/229934
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user