1
0
Fork 0

无可选候选词时不展示 QuickPick 弹窗

This commit is contained in:
程序员小墨 2024-04-09 14:15:29 +08:00
parent 47efcf56f5
commit 7f645cb8fb
1 changed files with 5 additions and 0 deletions

View File

@ -97,6 +97,11 @@ export function handleQuickPick() {
// 基于选中的文本生成选项
const options = generateOptionsBasedOnText(textList, eol);
if (options.length === 0) {
vscode.window.showInformationMessage('所选内容暂无可选转换,请尝试重新选择\nNo conversion candidates are available for the selected content, please try to select another text.');
return;
}
// 显示推荐项列表
vscode.window.showQuickPick(options, {
matchOnDetail: true,