Skip to content

Commit 79c611d

Browse files
committed
setting the margins inside of the case of initial render
1 parent a1e9302 commit 79c611d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,11 @@ export class InlineChatController implements IEditorContribution {
202202
let widgetPosition: Position | undefined;
203203
if (initialRender) {
204204
widgetPosition = this._editor.getPosition();
205+
this._zone.value.setMargins(widgetPosition);
205206
} else {
206207
widgetPosition = this._strategy.getWidgetPosition() ?? this._zone.value.position ?? this._activeSession.wholeRange.value.getEndPosition();
207208
}
208209
this._zone.value.show(widgetPosition);
209-
if (initialRender) {
210-
this._zone.value.setMargins(widgetPosition);
211-
}
212210
}
213211

214212
protected async _nextState(state: State, options: InlineChatRunOptions | undefined): Promise<void> {

0 commit comments

Comments
 (0)