mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:04:14 +08:00
Editor scroll position jumps up when returning to editor (#203013)
Fixes #202811
This commit is contained in:
parent
800e60abdf
commit
c1cbd49099
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user