diff options
Diffstat (limited to 'src/node/handler/PadMessageHandler.js')
-rw-r--r-- | src/node/handler/PadMessageHandler.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 9a0d1ee7..0172400b 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -773,8 +773,9 @@ function handleUserChanges(data, cb) } // Make sure the pad always ends with an empty line. - if (pad.text().lastIndexOf("\n\n") != pad.text().length-2) { - var nlChangeset = Changeset.makeSplice(pad.text(), pad.text().length-1, 0, "\n"); + if (pad.text().lastIndexOf("\n") != pad.text().length-1) { + var nlChangeset = Changeset.makeSplice(pad.text(), pad.text().length-1, + 0, "\n"); pad.appendRevision(nlChangeset); } |