src/vs/editor/browser/widget/diffEditorWidget.ts/DiffEditorWidget/revertChange
class DiffEditorWidget:	revertChange(change: IChange) {
		const editor = this._modifiedEditor;
		const original = this._originalEditor.getModel();
		const modified = this._modifiedEditor.getModel();
		if (!original || !modified || !editor) {
			return;
		}

		const originalRange = change.originalEndLineNumber > 0 ? new Range(change.originalStartLineNumber, 1, change.originalEndLineNumber, original.getLineMaxColumn(change.originalEndLineNumber)) : null;
		const originalContent = originalRange ? original.getValueInRange(originalRange) : null;

		const newRange = change.modifiedEndLineNumber > 0 ? new Range(change.modifiedStartLineNumber, 1, change.modifiedEndLineNumber, modified.getLineMaxColumn(change.modifiedEndLineNumber)) : null;

		const eol = modified.getEOL();

		if (change.originalEndLineNumber === 0 && newRange) {
			// Insert change.
			// To revert: delete the new content and a linebreak (if possible)

			let range = newRange;
			if (change.modifiedStartLineNumber > 1) {
				// Try to include a linebreak from before.
				range = newRange.setStartPosition(change.modifiedStartLineNumber - 1, modified.getLineMaxColumn(change.modifiedStartLineNumber - 1));
			} else if (change.modifiedEndLineNumber < modified.getLineCount()) {
				// Try to include the linebreak from after.
				range = newRange.setEndPosition(change.modifiedEndLineNumber + 1, 1);
			}
			editor.executeEdits('diffEditor', [{
				range,
				text: '',
			}]);
		} else if (change.modifiedEndLineNumber === 0 && originalContent !== null) {
			// Delete change.
			// To revert: insert the old content and a linebreak.

			const insertAt = change.modifiedStartLineNumber < modified.getLineCount() ? new Position(change.modifiedStartLineNumber + 1, 1) : new Position(change.modifiedStartLineNumber, modified.getLineMaxColumn(change.modifiedStartLineNumber));
			editor.executeEdits('diffEditor', [{
				range: Range.fromPositions(insertAt, insertAt),
				text: change.modifiedStartLineNumber < modified.getLineCount() ? originalContent + eol : eol + originalContent,
			}]);
		} else if (newRange && originalContent !== null) {
			// Modified change.
			editor.executeEdits('diffEditor', [{
				range: newRange,
				text: originalContent,
			}]);
		}
	}