include ~ in possible icon name. fixes #136172
This commit is contained in:
parent
c11a9ce097
commit
88d7502f32
|
@ -103,7 +103,7 @@ function doParseLabelWithIcons(text: string, firstIconIndex: number): IParsedLab
|
|||
// within icon
|
||||
else if (currentIconStart !== -1) {
|
||||
// Make sure this is a real icon name
|
||||
if (/^[a-z0-9\-]$/i.test(char)) {
|
||||
if (/^[a-z0-9\-~]$/i.test(char)) {
|
||||
currentIconValue += char;
|
||||
} else {
|
||||
// This is not a real icon, treat it as text
|
||||
|
|
|
@ -63,6 +63,11 @@ suite('Icon Labels', () => {
|
|||
filterOk(matchesFuzzyIconAware, 'unt', parseLabelWithIcons('$(primitive-dot) $(file-text) Untitled-1'), [
|
||||
{ start: 30, end: 33 },
|
||||
]);
|
||||
|
||||
// Testing #136172
|
||||
filterOk(matchesFuzzyIconAware, 's', parseLabelWithIcons('$(loading~spin) start'), [
|
||||
{ start: 16, end: 17 },
|
||||
]);
|
||||
});
|
||||
|
||||
test('stripIcons', () => {
|
||||
|
|
Loading…
Reference in a new issue