From 2ef785bb00545c3f175d8983d4537eb01ef09b7d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 16 May 2024 17:53:33 +0200 Subject: [PATCH] make sure to use `ScrollType.Immediate` when reveal inline chat content widget (#212906) fixes https://github.com/microsoft/vscode-copilot/issues/5573 --- .../contrib/inlineChat/browser/inlineChatContentWidget.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts index 8a64d210ece..b68ae908369 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts @@ -22,6 +22,7 @@ import { Range } from 'vs/editor/common/core/range'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; +import { ScrollType } from 'vs/editor/common/editorCommon'; export class InlineChatContentWidget implements IContentWidget { @@ -168,7 +169,7 @@ export class InlineChatContentWidget implements IContentWidget { this._visible = true; this._focusNext = true; - this._editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position)); + this._editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position), ScrollType.Immediate); this._widget.inputEditor.setValue(''); const wordInfo = this._editor.getModel()?.getWordAtPosition(position);