@@ -57,6 +57,7 @@ import { IReplaceService } from 'vs/workbench/parts/search/common/replace';
5757import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search' ;
5858import { FileMatch , FileMatchOrMatch , FolderMatch , IChangeEvent , ISearchWorkbenchService , Match , SearchModel } from 'vs/workbench/parts/search/common/searchModel' ;
5959import { ACTIVE_GROUP , IEditorService , SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService' ;
60+ import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService' ;
6061import { IPartService } from 'vs/workbench/services/part/common/partService' ;
6162import { IPreferencesService , ISettingsEditorOptions } from 'vs/workbench/services/preferences/common/preferences' ;
6263import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService' ;
@@ -133,7 +134,8 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
133134 @IUntitledEditorService private untitledEditorService : IUntitledEditorService ,
134135 @IPreferencesService private preferencesService : IPreferencesService ,
135136 @IThemeService protected themeService : IThemeService ,
136- @ISearchHistoryService private searchHistoryService : ISearchHistoryService
137+ @ISearchHistoryService private searchHistoryService : ISearchHistoryService ,
138+ @IEditorGroupsService private editorGroupsService : IEditorGroupsService
137139 ) {
138140 super ( VIEW_ID , partService , telemetryService , themeService ) ;
139141
@@ -1436,8 +1438,8 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
14361438 }
14371439
14381440 public open ( element : FileMatchOrMatch , preserveFocus ?: boolean , sideBySide ?: boolean , pinned ?: boolean ) : TPromise < any > {
1439- let selection = this . getSelectionFrom ( element ) ;
1440- let resource = element instanceof Match ? element . parent ( ) . resource ( ) : ( < FileMatch > element ) . resource ( ) ;
1441+ const selection = this . getSelectionFrom ( element ) ;
1442+ const resource = element instanceof Match ? element . parent ( ) . resource ( ) : ( < FileMatch > element ) . resource ( ) ;
14411443 return this . editorService . openEditor ( {
14421444 resource : resource ,
14431445 options : {
@@ -1455,6 +1457,8 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
14551457 } else {
14561458 this . viewModel . searchResult . rangeHighlightDecorations . removeHighlightRange ( ) ;
14571459 }
1460+
1461+ return this . editorGroupsService . activateGroup ( editor . group ) ;
14581462 } , errors . onUnexpectedError ) ;
14591463 }
14601464
0 commit comments