Skip to content

Commit 52b1dcc

Browse files
committed
Fix label formatter caching take 2
Fixes microsoft#150970
1 parent 3cfcfa9 commit 52b1dcc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vs/workbench/services/label/common/labelService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class LabelService extends Disposable implements ILabelService {
142142
this.os = OS;
143143
this.userHome = pathService.defaultUriScheme === Schemas.file ? this.pathService.userHome({ preferLocal: true }) : undefined;
144144

145-
const memento = this.storedFormattersMemento = new Memento('cachedResourceFormatters', storageService);
145+
const memento = this.storedFormattersMemento = new Memento('cachedResourceLabelFormatters', storageService);
146146
this.storedFormatters = memento.getMemento(StorageScope.GLOBAL, StorageTarget.MACHINE);
147147
this.formatters = this.storedFormatters?.formatters || [];
148148

src/vs/workbench/services/label/test/browser/label.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ suite('URI Label', () => {
166166

167167

168168
test('label caching', () => {
169-
const m = new Memento('cachedResourceFormatters', storageService).getMemento(StorageScope.GLOBAL, StorageTarget.MACHINE);
169+
const m = new Memento('cachedResourceLabelFormatters', storageService).getMemento(StorageScope.GLOBAL, StorageTarget.MACHINE);
170170
const makeFormatter = (scheme: string): ResourceLabelFormatter => ({ formatting: { label: `\${path} (${scheme})`, separator: '/' }, scheme });
171171
assert.deepStrictEqual(m, {});
172172

0 commit comments

Comments
 (0)