diff --git a/CHANGELOG.md b/CHANGELOG.md index 65570a1..124e95c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --> +## [Unreleased] + +### Changed + +-- Optimize QickPick conversion value display (优化 QickPick 转换值展示) + ## 1.0.6 ### Added diff --git a/src/extension-handler/quick-pick-handler.ts b/src/extension-handler/quick-pick-handler.ts index 93d64be..ba2389f 100644 --- a/src/extension-handler/quick-pick-handler.ts +++ b/src/extension-handler/quick-pick-handler.ts @@ -55,10 +55,11 @@ function generateOptionsBasedOnText(text: string, eol: EOL): Array= QuickPickLabelMaxLength - ? (recommendItem.conversionText.substring(0, QuickPickLabelMaxLength - 3) + '...') - : recommendItem.conversionText, + label: conversionTextForDisplay.length >= QuickPickLabelMaxLength + ? (conversionTextForDisplay.substring(0, QuickPickLabelMaxLength - 3) + '...') + : conversionTextForDisplay, description: `转换为 ${recommendItem.transforTo.join(' / ')}`, detail: `关键词 ${recommendItem.keyword.join(' ')}`, value: recommendItem.conversionText,