提交 4a2a9267 编写于 作者: R Rob Lourens

Fix #24717

上级 26b228d3
......@@ -57,6 +57,7 @@ import { IReplaceService } from 'vs/workbench/parts/search/common/replace';
import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search';
import { FileMatch, FileMatchOrMatch, FolderMatch, IChangeEvent, ISearchWorkbenchService, Match, SearchModel } from 'vs/workbench/parts/search/common/searchModel';
import { ACTIVE_GROUP, IEditorService, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
import { IPartService } from 'vs/workbench/services/part/common/partService';
import { IPreferencesService, ISettingsEditorOptions } from 'vs/workbench/services/preferences/common/preferences';
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
......@@ -133,7 +134,8 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
@IUntitledEditorService private untitledEditorService: IUntitledEditorService,
@IPreferencesService private preferencesService: IPreferencesService,
@IThemeService protected themeService: IThemeService,
@ISearchHistoryService private searchHistoryService: ISearchHistoryService
@ISearchHistoryService private searchHistoryService: ISearchHistoryService,
@IEditorGroupsService private editorGroupsService: IEditorGroupsService
) {
super(VIEW_ID, partService, telemetryService, themeService);
......@@ -1436,8 +1438,8 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
}
public open(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): TPromise<any> {
let selection = this.getSelectionFrom(element);
let resource = element instanceof Match ? element.parent().resource() : (<FileMatch>element).resource();
const selection = this.getSelectionFrom(element);
const resource = element instanceof Match ? element.parent().resource() : (<FileMatch>element).resource();
return this.editorService.openEditor({
resource: resource,
options: {
......@@ -1455,6 +1457,8 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
} else {
this.viewModel.searchResult.rangeHighlightDecorations.removeHighlightRange();
}
return this.editorGroupsService.activateGroup(editor.group);
}, errors.onUnexpectedError);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册