From ac0a9178795e7eb415d4a02722de0a8a4ae6a6f5 Mon Sep 17 00:00:00 2001 From: chouchouji <1305974212@qq.com> Date: Fri, 15 Nov 2024 20:29:37 +0800 Subject: [PATCH] fix: don't allow to add alias to current group --- src/extension.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 2311da8..273a8cc 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -291,7 +291,7 @@ class AliasView implements vscode.TreeDataProvider { this.globalState.update(alias.group, aliases); - this.refresh(alias); + this.refresh(); } async addToGroup(alias: AliasItem) { @@ -300,7 +300,7 @@ class AliasView implements vscode.TreeDataProvider { } 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 }, );