@@ -12,6 +12,7 @@ import { TextEditorOptions } from 'vs/workbench/common/editor';
1212import { ACTIVE_GROUP , IEditorService , SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService' ;
1313import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService' ;
1414import { registerSingleton } from 'vs/platform/instantiation/common/extensions' ;
15+ import { extUri } from 'vs/base/common/resources' ;
1516
1617export class CodeEditorService extends CodeEditorServiceImpl {
1718
@@ -47,13 +48,13 @@ export class CodeEditorService extends CodeEditorServiceImpl {
4748 // side as separate editor.
4849 const activeTextEditorControl = this . editorService . activeTextEditorControl ;
4950 if (
50- ! sideBySide && // we need the current active group to be the taret
51- isDiffEditor ( activeTextEditorControl ) && // we only support this for active text diff editors
52- input . options && // we need options to apply
53- input . resource && // we need a request resource to compare with
54- activeTextEditorControl . getModel ( ) && // we need a target model to compare with
55- source === activeTextEditorControl . getModifiedEditor ( ) && // we need the source of this request to be the modified side of the diff editor
56- input . resource . toString ( ) === activeTextEditorControl . getModel ( ) ! . modified . uri . toString ( ) // we need the input resources to match with modified side
51+ ! sideBySide && // we need the current active group to be the taret
52+ isDiffEditor ( activeTextEditorControl ) && // we only support this for active text diff editors
53+ input . options && // we need options to apply
54+ input . resource && // we need a request resource to compare with
55+ activeTextEditorControl . getModel ( ) && // we need a target model to compare with
56+ source === activeTextEditorControl . getModifiedEditor ( ) && // we need the source of this request to be the modified side of the diff editor
57+ extUri . isEqual ( input . resource , activeTextEditorControl . getModel ( ) ! . modified . uri ) // we need the input resources to match with modified side
5758 ) {
5859 const targetEditor = activeTextEditorControl . getModifiedEditor ( ) ;
5960
0 commit comments