summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node/handler/PadMessageHandler.js5
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);
}