Skip to content

Commit 5ef8083

Browse files
committed
Don't try to pattern match when no patterns are set
1 parent 6c6d929 commit 5ef8083

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/vs/workbench/services/editor/common/customEditorLabelService.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class CustomEditorLabelService extends Disposable implements ICustomEdito
116116
}
117117

118118
getName(resource: URI): string | undefined {
119-
if (!this.enabled) {
119+
if (!this.enabled || this.patterns.length === 0) {
120120
return undefined;
121121
}
122122

@@ -132,10 +132,6 @@ export class CustomEditorLabelService extends Disposable implements ICustomEdito
132132
}
133133

134134
private applyPatterns(resource: URI): string | undefined {
135-
if (this.patterns.length === 0) {
136-
return undefined;
137-
}
138-
139135
const root = this.workspaceContextService.getWorkspaceFolder(resource);
140136
let relativePath: string | undefined;
141137

0 commit comments

Comments
 (0)