src/vs/workbench/common/editor/sideBySideEditorInput.ts/SideBySideEditorInput/saveResultToEditor
class SideBySideEditorInput:	private saveResultToEditor(primarySaveResult: EditorInput | IUntypedEditorInput | undefined): EditorInput | IUntypedEditorInput | undefined {
		if (!primarySaveResult || !this.hasIdenticalSides) {
			return primarySaveResult;
		}

		if (this.primary.matches(primarySaveResult)) {
			return this;
		}

		if (primarySaveResult instanceof EditorInput) {
			return new SideBySideEditorInput(this.preferredName, this.preferredDescription, primarySaveResult, primarySaveResult, this.editorService);
		}

		if (!isResourceDiffEditorInput(primarySaveResult) && !isResourceSideBySideEditorInput(primarySaveResult) && !isResourceMergeEditorInput(primarySaveResult)) {
			return {
				primary: primarySaveResult,
				secondary: primarySaveResult,
				label: this.preferredName,
				description: this.preferredDescription
			};
		}

		return undefined;
	}