Skip to content

Commit 03b00ce

Browse files
authored
Merge pull request microsoft#229936 from microsoft/joh/optimistic-deer
counter revealLines-logic with sticky scroll max lines
2 parents b611101 + 9953131 commit 03b00ce

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)