Skip to content

Commit 88d7502

Browse files
include ~ in possible icon name. fixes microsoft#136172
1 parent c11a9ce commit 88d7502

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/vs/base/common/iconLabels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function doParseLabelWithIcons(text: string, firstIconIndex: number): IParsedLab
103103
// within icon
104104
else if (currentIconStart !== -1) {
105105
// Make sure this is a real icon name
106-
if (/^[a-z0-9\-]$/i.test(char)) {
106+
if (/^[a-z0-9\-~]$/i.test(char)) {
107107
currentIconValue += char;
108108
} else {
109109
// This is not a real icon, treat it as text

src/vs/base/test/common/iconLabels.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ suite('Icon Labels', () => {
6363
filterOk(matchesFuzzyIconAware, 'unt', parseLabelWithIcons('$(primitive-dot) $(file-text) Untitled-1'), [
6464
{ start: 30, end: 33 },
6565
]);
66+
67+
// Testing #136172
68+
filterOk(matchesFuzzyIconAware, 's', parseLabelWithIcons('$(loading~spin) start'), [
69+
{ start: 16, end: 17 },
70+
]);
6671
});
6772

6873
test('stripIcons', () => {

0 commit comments

Comments
 (0)