make sure to use ScrollType.Immediate when reveal inline chat content widget (#212906)

fixes https://github.com/microsoft/vscode-copilot/issues/5573
This commit is contained in:
Johannes Rieken
2024-05-16 17:53:33 +02:00
committed by GitHub
parent 32f970f937
commit 2ef785bb00
@@ -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);