mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
parent
95d8fd7c14
commit
5597167c4c
|
@ -13,6 +13,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict
|
|||
public incoming: interfaces.IMergeRegion;
|
||||
public commonAncestors: interfaces.IMergeRegion[];
|
||||
public splitter: vscode.Range;
|
||||
private applied = false;
|
||||
|
||||
constructor(descriptor: interfaces.IDocumentMergeConflictDescriptor, private readonly telemetryReporter: TelemetryReporter) {
|
||||
this.range = descriptor.range;
|
||||
|
@ -53,6 +54,10 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict
|
|||
}
|
||||
|
||||
public applyEdit(type: interfaces.CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void }): void {
|
||||
if (this.applied) {
|
||||
return;
|
||||
}
|
||||
this.applied = true;
|
||||
|
||||
// Each conflict is a set of ranges as follows, note placements or newlines
|
||||
// which may not in spans
|
||||
|
|
Loading…
Reference in a new issue