@@ -818,7 +818,7 @@ export class EditorService extends Disposable implements EditorServiceImpl {
818818 const rightInput = this . createEditorInput ( { resource : resourceDiffInput . rightResource , forceFile : resourceDiffInput . forceFile } ) ;
819819
820820 return new DiffEditorInput (
821- resourceDiffInput . label || this . toSideBySideLabel ( leftInput , rightInput , '↔' ) ,
821+ resourceDiffInput . label || this . toSideBySideLabel ( leftInput , rightInput ) ,
822822 resourceDiffInput . description ,
823823 leftInput ,
824824 rightInput
@@ -968,18 +968,13 @@ export class EditorService extends Disposable implements EditorServiceImpl {
968968 return input ;
969969 }
970970
971- private toSideBySideLabel ( leftInput : EditorInput , rightInput : EditorInput , divider : string ) : string | undefined {
972-
973- // Without any resource, do not try to compute a label
974- if ( ! leftInput . resource || ! rightInput . resource ) {
975- return undefined ;
976- }
971+ private toSideBySideLabel ( leftInput : EditorInput , rightInput : EditorInput ) : string | undefined {
977972
978973 // If both editors are file inputs, we produce an optimized label
979974 // by adding the relative path of both inputs to the label. This
980975 // makes it easier to understand a file-based comparison.
981976 if ( this . fileEditorInputFactory . isFileEditorInput ( leftInput ) && this . fileEditorInputFactory . isFileEditorInput ( rightInput ) ) {
982- return `${ this . labelService . getUriLabel ( leftInput . preferredResource , { relative : true } ) } ${ divider } ${ this . labelService . getUriLabel ( rightInput . preferredResource , { relative : true } ) } ` ;
977+ return `${ this . labelService . getUriLabel ( leftInput . preferredResource , { relative : true } ) } ↔ ${ this . labelService . getUriLabel ( rightInput . preferredResource , { relative : true } ) } ` ;
983978 }
984979
985980 // Signal back that the label should be computed from within the editor
0 commit comments