<commit_before>/*global define*/
define(["orion/textview/textModel"], function(mTextModel) {
	function _dbgEvent(e) {
//		var r = [];
//		for (var p in e) {
//			if (e.hasOwnProperty(p) && p !== "text") {
//				r.push(p + ": " + e[p]);
//			}
//		}
//		console.debug( r.join(", ") );
	}
	
	/**
	 * @name orion.editor.MirrorTextModel
	 * @class An implementation of {@link orion.textview.TextModel} that keeps its text content in sync with another <code>TextModel</code>'s.
	 * @extends orion.textview.TextModel
	 */
	function MirrorTextModel() {
	}
	MirrorTextModel.prototype = new mTextModel.TextModel();
	// Called when the TextModel we're mirroring has dispatched a ModelChanging event.
	MirrorTextModel.prototype.onTargetModelChanging = function(e) {
		_dbgEvent(e);
		var end = e.start + e.removedCharCount - e.addedCharCount;<commit_msg>Fix: mirrored TextModel content was wrong<commit_after>/*global define*/
define(["orion/textview/textModel"], function(mTextModel) {
	function _dbgEvent(e) {
//		var r = [];
//		for (var p in e) {
//			if (e.hasOwnProperty(p) && p !== "text") {
//				r.push(p + ": " + e[p]);
//			}
//		}
//		console.debug( r.join(", ") );
	}
	
	/**
	 * @name orion.editor.MirrorTextModel
	 * @class An implementation of {@link orion.textview.TextModel} that keeps its text content in sync with another <code>TextModel</code>'s.
	 * @extends orion.textview.TextModel
	 */
	function MirrorTextModel() {
	}
	MirrorTextModel.prototype = new mTextModel.TextModel();
	// Called when the TextModel we're mirroring has dispatched a ModelChanging event.
	MirrorTextModel.prototype.onTargetModelChanging = function(e) {
		_dbgEvent(e);
		var end = e.start + e.removedCharCount;
{'fraction_non_alphanumeric': 0.15988200589970503, 'fraction_numerical': 0.0, 'mean_word_length': 3.7374301675977653, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3477245', 'n_tokens_mistral': 622, 'n_tokens_neox': 585, 'n_words': 133}