Skip to content

Commit

Permalink
fix: trigger suggest correctly while open settings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
erha19 committed Apr 22, 2022
1 parent 11a8201 commit 7abd0b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/preferences/src/browser/preference-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ export class PreferenceContribution
});

commands.registerCommand(PREFERENCE_COMMANDS.OPEN_USER_SETTING_FILE, {
execute: async () => {
execute: () => {
this.openResource(PreferenceScope.User);
},
});

commands.registerCommand(PREFERENCE_COMMANDS.OPEN_WORKSPACE_SETTING_FILE, {
execute: async () => {
execute: () => {
this.openResource(PreferenceScope.Workspace);
},
});
Expand Down Expand Up @@ -320,6 +320,10 @@ export class PreferenceContribution
const openResult = await this.commandService.executeCommand<IResourceOpenResult>(
EDITOR_COMMANDS.OPEN_RESOURCE.id,
new URI(url),
{
focus: true,
groupIndex: this.workbenchEditorService.currentEditorGroup.index,
},
);
if (openResult && preferenceId) {
const editor = this.workbenchEditorService.editorGroups.find((g) => g.name === openResult.groupId)?.currentEditor;
Expand Down

0 comments on commit 7abd0b8

Please sign in to comment.