File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/vs/workbench/contrib/inlineChat/browser Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,11 @@ export class InlineChatController implements IEditorContribution {
203
203
} else {
204
204
widgetPosition = this . _strategy . getWidgetPosition ( ) ;
205
205
}
206
- this . _zone . value . show ( ( widgetPosition ?? this . _zone . value . position ) ?? this . _activeSession . wholeRange . value . getEndPosition ( ) ) ;
206
+ const position = ( ( widgetPosition ?? this . _zone . value . position ) ?? this . _activeSession . wholeRange . value . getEndPosition ( ) ) ;
207
+ this . _zone . value . show ( position ) ;
208
+ if ( initialRender ) {
209
+ this . _zone . value . setMargins ( position ) ;
210
+ }
207
211
}
208
212
209
213
protected async _nextState ( state : State , options : InlineChatRunOptions | undefined ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -795,10 +795,9 @@ export class InlineChatZoneWidget extends ZoneWidget {
795
795
super . show ( position , this . _computeHeightInLines ( ) ) ;
796
796
this . widget . focus ( ) ;
797
797
this . _ctxVisible . set ( true ) ;
798
- this . _setMargins ( position ) ;
799
798
}
800
799
801
- private _setMargins ( position : Position ) : void {
800
+ public setMargins ( position : Position ) : void {
802
801
const viewModel = this . editor . _getViewModel ( ) ;
803
802
if ( ! viewModel ) {
804
803
return ;
You can’t perform that action at this time.
0 commit comments