Don't include duplicate default entries for custom editors
Fixes #99114
This commit is contained in:
parent
fbe93d13e7
commit
6532cc6c8d
|
@ -443,14 +443,16 @@ export class CustomEditorContribution extends Disposable implements IWorkbenchCo
|
|||
...defaultEditorOverrideEntry,
|
||||
active: currentEditor instanceof FileEditorInput,
|
||||
},
|
||||
...customEditors.allEditors.map(entry => {
|
||||
return {
|
||||
id: entry.id,
|
||||
active: currentEditor instanceof CustomEditorInput && currentEditor.viewType === entry.id,
|
||||
label: entry.displayName,
|
||||
detail: entry.providerDisplayName,
|
||||
};
|
||||
})
|
||||
...customEditors.allEditors
|
||||
.filter(entry => entry.id !== defaultCustomEditor.id)
|
||||
.map(entry => {
|
||||
return {
|
||||
id: entry.id,
|
||||
active: currentEditor instanceof CustomEditorInput && currentEditor.viewType === entry.id,
|
||||
label: entry.displayName,
|
||||
detail: entry.providerDisplayName,
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue