Skip to content

Commit 4a2a926

Browse files
committed
1 parent 26b228d commit 4a2a926

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/vs/workbench/parts/search/browser/searchView.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import { IReplaceService } from 'vs/workbench/parts/search/common/replace';
5757
import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search';
5858
import { FileMatch, FileMatchOrMatch, FolderMatch, IChangeEvent, ISearchWorkbenchService, Match, SearchModel } from 'vs/workbench/parts/search/common/searchModel';
5959
import { ACTIVE_GROUP, IEditorService, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService';
60+
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
6061
import { IPartService } from 'vs/workbench/services/part/common/partService';
6162
import { IPreferencesService, ISettingsEditorOptions } from 'vs/workbench/services/preferences/common/preferences';
6263
import { 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

Comments
 (0)