Fixes #127084
This commit is contained in:
parent
52b9b964c1
commit
a541cbf2e7
2 changed files with 5 additions and 2 deletions
|
@ -271,7 +271,7 @@ export class EditorResolverService extends Disposable implements IEditorResolver
|
|||
for (const [key, editors] of this._editors) {
|
||||
for (const editor of editors) {
|
||||
const foundInSettings = userSettings.find(setting => setting.viewType === editor.editorInfo.id);
|
||||
if (foundInSettings || globMatchesResource(key, resource)) {
|
||||
if ((foundInSettings && editor.editorInfo.priority !== RegisteredEditorPriority.exclusive) || globMatchesResource(key, resource)) {
|
||||
matchingEditors.push(editor);
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,9 @@ export class EditorResolverService extends Disposable implements IEditorResolver
|
|||
|
||||
public getEditorIds(resource: URI): string[] {
|
||||
const editors = this.findMatchingEditors(resource);
|
||||
if (editors.find(e => e.editorInfo.priority === RegisteredEditorPriority.exclusive)) {
|
||||
return [];
|
||||
}
|
||||
return editors.map(editor => editor.editorInfo.id);
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ export interface IEditorResolverService {
|
|||
resolveEditor(editor: IEditorInputWithOptions | IUntypedEditorInput, preferredGroup: PreferredGroup | undefined): Promise<ResolvedEditor>;
|
||||
|
||||
/**
|
||||
* Given a resource returns all the editor ids that match that resource
|
||||
* Given a resource returns all the editor ids that match that resource. If there is exclusive editor we return an empty array
|
||||
* @param resource The resource
|
||||
* @returns A list of editor ids
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue