未验证 提交 a541cbf2 编写于 作者: L Logan Ramos

Fixes #127084

上级 52b9b964
......@@ -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
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册