@@ -18,7 +18,7 @@ import { localize } from 'vs/nls';
18
18
import { ConfirmResult , IDialogOptions , IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
19
19
import { IEditorModel } from 'vs/platform/editor/common/editor' ;
20
20
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
21
- import { IRevertOptions } from 'vs/workbench/common/editor' ;
21
+ import { IRevertOptions , SaveSourceRegistry } from 'vs/workbench/common/editor' ;
22
22
import { EditorModel } from 'vs/workbench/common/editor/editorModel' ;
23
23
import { MergeEditorInputData } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput' ;
24
24
import { conflictMarkers } from 'vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController' ;
@@ -269,6 +269,8 @@ export class WorkspaceMergeEditorModeFactory implements IMergeEditorInputModelFa
269
269
) {
270
270
}
271
271
272
+ private static readonly FILE_SAVED_SOURCE = SaveSourceRegistry . registerSource ( 'merge-editor.source' , localize ( 'merge-editor.source' , "Before Resolving Conflicts In Merge Editor" ) ) ;
273
+
272
274
public async createInputModel ( args : MergeEditorArgs ) : Promise < IMergeEditorInputModel > {
273
275
const store = new DisposableStore ( ) ;
274
276
@@ -302,7 +304,7 @@ export class WorkspaceMergeEditorModeFactory implements IMergeEditorInputModelFa
302
304
throw new BugIndicatingError ( ) ;
303
305
}
304
306
// So that "Don't save" does revert the file
305
- await resultTextFileModel . save ( ) ;
307
+ await resultTextFileModel . save ( { source : WorkspaceMergeEditorModeFactory . FILE_SAVED_SOURCE } ) ;
306
308
307
309
const lines = resultTextFileModel . textEditorModel ! . getLinesContent ( ) ;
308
310
const hasConflictMarkers = lines . some ( l => l . startsWith ( conflictMarkers . start ) ) ;
0 commit comments