Skip to content

Commit

Permalink
fix: don't allow to add alias to current group
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Nov 15, 2024
1 parent 3068ad1 commit ac0a917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class AliasView implements vscode.TreeDataProvider<AliasItem> {

this.globalState.update(alias.group, aliases);

this.refresh(alias);
this.refresh();
}

async addToGroup(alias: AliasItem) {
Expand All @@ -300,7 +300,7 @@ class AliasView implements vscode.TreeDataProvider<AliasItem> {
}

const selectedGroup = await vscode.window.showQuickPick(
this.globalState.keys().filter((key) => key !== SYSTEM_ALIAS),
this.globalState.keys().filter((key) => ![SYSTEM_ALIAS, alias.group].includes(key)),
{ placeHolder: CHOOSE_GROUP_PLACEHOLDER },
);

Expand Down

0 comments on commit ac0a917

Please sign in to comment.