summaryrefslogtreecommitdiff
path: root/src/static/js
diff options
context:
space:
mode:
authorwebzwo0i <webzwo0i@c3d2.de>2015-02-15 14:56:20 +0100
committerwebzwo0i <webzwo0i@c3d2.de>2015-02-15 14:56:20 +0100
commitb4d4b16b1f86e518be1df24c4fc5e67b923f4a4f (patch)
treeb82f833bbdf6610ed22cdc1ed84f35cbccb20fc8 /src/static/js
parent4313bd27f84d29c604d593a69bd09aee5189b290 (diff)
downloadetherpad-lite-b4d4b16b1f86e518be1df24c4fc5e67b923f4a4f.zip
off by 1
Diffstat (limited to 'src/static/js')
-rw-r--r--src/static/js/Changeset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js
index a7ae8e71..2f1a53bc 100644
--- a/src/static/js/Changeset.js
+++ b/src/static/js/Changeset.js
@@ -910,7 +910,7 @@ exports.pack = function (oldLen, newLen, opsStr, bank) {
* @params str {string} String to which a Changeset should be applied
*/
exports.applyToText = function (cs, str) {
- var totalNrOfLines = str.split("\n").length;
+ var totalNrOfLines = str.split("\n").length - 1;
var removedLines = 0;
var unpacked = exports.unpack(cs);
exports.assert(str.length == unpacked.oldLen, "mismatched apply: ", str.length, " / ", unpacked.oldLen);