File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/vs/workbench/contrib/inlineChat/browser Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,8 @@ export class InlineChatController implements IEditorContribution {
629
629
630
630
// if there's already a tab open for targetUri, show it and move inline chat to that tab
631
631
// otherwise, open the tab to the side
632
- const editorPane = await this . _editorService . openEditor ( { resource : e . target } , SIDE_GROUP ) ;
632
+ const initialSelection = Selection . fromRange ( Range . lift ( e . range ) , SelectionDirection . LTR ) ;
633
+ const editorPane = await this . _editorService . openEditor ( { resource : e . target , options : { selection : initialSelection } } , SIDE_GROUP ) ;
633
634
634
635
if ( ! editorPane ) {
635
636
log ( 'opening editor failed' ) ;
@@ -655,9 +656,8 @@ export class InlineChatController implements IEditorContribution {
655
656
} ,
656
657
CancellationToken . None ) ; // TODO@ulugbekna : add proper cancellation?
657
658
658
- const initialSelection = Selection . fromRange ( Range . lift ( e . range ) , SelectionDirection . LTR ) ;
659
659
660
- InlineChatController . get ( newEditor ) ?. run ( { initialSelection , existingSession : newSession } ) ;
660
+ InlineChatController . get ( newEditor ) ?. run ( { existingSession : newSession } ) ;
661
661
662
662
next = State . CANCEL ;
663
663
responsePromise . complete ( ) ;
You can’t perform that action at this time.
0 commit comments