Skip to content

Commit 1310cef

Browse files
committed
fix: fix decoration too long
1 parent 1dc1432 commit 1310cef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/decoration-manager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,14 @@ export default class DecorationManager {
207207
valueDecorations.push(decoration);
208208

209209
const themeFocusBorderColor = new vscode.ThemeColor("focusBorder");
210+
const stringValue = String(this.fullToken[key]);
210211
const decorationType = vscode.window.createTextEditorDecorationType({
211212
after: {
212-
contentText: colorValue ? "--" : `${String(this.fullToken[key])}`,
213+
contentText: colorValue
214+
? "--"
215+
: stringValue.length > 36
216+
? `${stringValue.slice(0, 36)}...`
217+
: stringValue,
213218
color: colorValue ? "transparent" : "#b37feb",
214219
backgroundColor: colorValue || "",
215220
border: "2px solid",

0 commit comments

Comments
 (0)