Skip to content

Commit

Permalink
Fix #141326
Browse files Browse the repository at this point in the history
  • Loading branch information
lramos15 committed Jan 25, 2022
1 parent 07c6f53 commit c5ab188
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/vs/workbench/api/browser/mainThreadEditorTabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DisposableStore } from 'vs/base/common/lifecycle';
import { URI } from 'vs/base/common/uri';
import { ExtHostContext, IExtHostEditorTabsShape, IExtHostContext, MainContext, IEditorTabDto } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { EditorResourceAccessor, IUntypedEditorInput, SideBySideEditor, GroupModelChangeKind } from 'vs/workbench/common/editor';
import { EditorResourceAccessor, IUntypedEditorInput, SideBySideEditor, GroupModelChangeKind, DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor';
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
import { isGroupEditorCloseEvent, isGroupEditorMoveEvent, isGroupEditorOpenEvent } from 'vs/workbench/common/editor/editorGroupModel';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
Expand Down Expand Up @@ -76,9 +76,10 @@ export class MainThreadEditorTabs {
secondary: { resource: URI.revive(tab.additionalResourcesAndViewIds[1].resource), options: { override: tab.additionalResourcesAndViewIds[1].viewId } }
};
} else {
// For now only text diff editor are supported
return {
modified: { resource: URI.revive(tab.resource), options: { override: tab.editorId } },
original: { resource: URI.revive(tab.additionalResourcesAndViewIds[1].resource), options: { override: tab.additionalResourcesAndViewIds[1].viewId } }
modified: { resource: URI.revive(tab.resource), options: { override: DEFAULT_EDITOR_ASSOCIATION.id } },
original: { resource: URI.revive(tab.additionalResourcesAndViewIds[1].resource), options: { override: DEFAULT_EDITOR_ASSOCIATION.id } }
};
}
}
Expand Down Expand Up @@ -277,7 +278,8 @@ export class MainThreadEditorTabs {
if (!group) {
return;
}
const editor = group.editors.find(editor => editor.matches(this._tabToUntypedEditorInput(tab)));
const editorTab = this._tabToUntypedEditorInput(tab);
const editor = group.editors.find(editor => editor.matches(editorTab));
if (!editor) {
return;
}
Expand Down

0 comments on commit c5ab188

Please sign in to comment.