Skip to content

Commit 6532cc6

Browse files
committed
Don't include duplicate default entries for custom editors
Fixes microsoft#99114
1 parent fbe93d1 commit 6532cc6

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/vs/workbench/contrib/customEditor/browser/customEditors.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,14 +443,16 @@ export class CustomEditorContribution extends Disposable implements IWorkbenchCo
443443
...defaultEditorOverrideEntry,
444444
active: currentEditor instanceof FileEditorInput,
445445
},
446-
...customEditors.allEditors.map(entry => {
447-
return {
448-
id: entry.id,
449-
active: currentEditor instanceof CustomEditorInput && currentEditor.viewType === entry.id,
450-
label: entry.displayName,
451-
detail: entry.providerDisplayName,
452-
};
453-
})
446+
...customEditors.allEditors
447+
.filter(entry => entry.id !== defaultCustomEditor.id)
448+
.map(entry => {
449+
return {
450+
id: entry.id,
451+
active: currentEditor instanceof CustomEditorInput && currentEditor.viewType === entry.id,
452+
label: entry.displayName,
453+
detail: entry.providerDisplayName,
454+
};
455+
})
454456
];
455457
}
456458
}));

0 commit comments

Comments
 (0)