From 3354b9406b94e1a04b5eee1c0152914dde73ba89 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Tue, 16 Dec 2014 12:29:33 +0100 Subject: [PATCH] op is ok, if it doesnt include newlines. op is ok, if op.lines is equal to newlines in op.chars --- src/static/js/Changeset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index acb59cc31..32da887df 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -929,7 +929,7 @@ exports.applyToText = function (cs, str) { removedLines += op.lines; newlines = strIter.newlines() strIter.skip(op.chars); - if(!(newlines - strIter.newlines() == op.lines)){ + if(!(newlines - strIter.newlines() == 0) && (newlines - strIter.newlines() != op.lines)){ newlinefail = true } break;