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 {
203203 } else {
204204 widgetPosition = this . _strategy . getWidgetPosition ( ) ;
205205 }
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+ }
207211 }
208212
209213 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 {
795795 super . show ( position , this . _computeHeightInLines ( ) ) ;
796796 this . widget . focus ( ) ;
797797 this . _ctxVisible . set ( true ) ;
798- this . _setMargins ( position ) ;
799798 }
800799
801- private _setMargins ( position : Position ) : void {
800+ public setMargins ( position : Position ) : void {
802801 const viewModel = this . editor . _getViewModel ( ) ;
803802 if ( ! viewModel ) {
804803 return ;
You can’t perform that action at this time.
0 commit comments