diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts index 4784d1c38c566..e5ae9040d5096 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts @@ -25,6 +25,7 @@ import { ICellRange } from 'vs/workbench/contrib/notebook/common/notebookRange'; import { commentThreadStateBackgroundColorVar, commentThreadStateColorVar, getCommentThreadStateBorderColor } from 'vs/workbench/contrib/comments/browser/commentColors'; import { peekViewBorder } from 'vs/editor/contrib/peekView/browser/peekView'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { StableEditorScrollState } from 'vs/editor/browser/stableEditorScroll'; function getCommentThreadWidgetStateColor(thread: languages.CommentThreadState | undefined, theme: IColorTheme): Color | undefined { return getCommentThreadStateBorderColor(thread, theme) ?? theme.getColor(peekViewBorder); @@ -453,7 +454,9 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this._commentThreadWidget.focusCommentEditor(); } + const capture = StableEditorScrollState.capture(this.editor); this._relayout(computedLinesNumber); + capture.restore(this.editor); } }