diff options
author | webzwo0i <webzwo0i@c3d2.de> | 2015-02-15 14:56:20 +0100 |
---|---|---|
committer | webzwo0i <webzwo0i@c3d2.de> | 2015-02-15 14:56:20 +0100 |
commit | b4d4b16b1f86e518be1df24c4fc5e67b923f4a4f (patch) | |
tree | b82f833bbdf6610ed22cdc1ed84f35cbccb20fc8 /src/static/js | |
parent | 4313bd27f84d29c604d593a69bd09aee5189b290 (diff) | |
download | etherpad-lite-b4d4b16b1f86e518be1df24c4fc5e67b923f4a4f.zip |
off by 1
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/Changeset.js | 2 |
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); |