File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,14 +119,11 @@ class SymbolEntry extends EditorQuickOpenEntry {
119119 const input : IResourceInput = {
120120 resource : this . bearing . location . uri ,
121121 options : {
122- pinned : ! this . configurationService . getValue < IWorkbenchEditorConfiguration > ( ) . workbench . editor . enablePreviewFromQuickOpen
122+ pinned : ! this . configurationService . getValue < IWorkbenchEditorConfiguration > ( ) . workbench . editor . enablePreviewFromQuickOpen ,
123+ selection : this . bearing . location . range ? Range . collapseToStart ( this . bearing . location . range ) : undefined
123124 }
124125 } ;
125126
126- if ( this . bearing . location . range ) {
127- input . options ! . selection = Range . collapseToStart ( this . bearing . location . range ) ;
128- }
129-
130127 return input ;
131128 }
132129
Original file line number Diff line number Diff line change @@ -354,15 +354,11 @@ export class HistoryService extends Disposable implements IHistoryService {
354354
355355 private doNavigate ( location : IStackEntry ) : Promise < IBaseEditor | undefined > {
356356 const options : ITextEditorOptions = {
357- revealIfOpened : true // support to navigate across editor groups
357+ revealIfOpened : true , // support to navigate across editor groups,
358+ selection : location . selection ,
359+ revealInCenterIfOutsideViewport : ! ! location . selection
358360 } ;
359361
360- // Support selection and minimize scrolling by setting revealInCenterIfOutsideViewport
361- if ( location . selection ) {
362- options . selection = location . selection ;
363- options . revealInCenterIfOutsideViewport = true ;
364- }
365-
366362 if ( location . input instanceof EditorInput ) {
367363 return this . editorService . openEditor ( location . input , options ) ;
368364 }
You can’t perform that action at this time.
0 commit comments