summaryrefslogtreecommitdiff
path: root/src/node/db
diff options
context:
space:
mode:
authorXavid <xavid@mit.edu>2015-05-05 14:14:25 -0400
committerXavid <xavid@mit.edu>2015-05-05 14:18:27 -0400
commit5e64c292a4ae2639bf068d31a208f582513149c7 (patch)
tree3c18bcbe29bf7239a2ef21e3bf385e6ea0a8759b /src/node/db
parenta5872f536b591b82b66ff6c407f34a0fa2d9baf8 (diff)
downloadetherpad-lite-5e64c292a4ae2639bf068d31a208f582513149c7.zip
When using setText(), replace the entire existing text of the pad,
rather than replacing all except the last letter.
Diffstat (limited to 'src/node/db')
-rw-r--r--src/node/db/Pad.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js
index 53847600..e70628b7 100644
--- a/src/node/db/Pad.js
+++ b/src/node/db/Pad.js
@@ -290,7 +290,7 @@ Pad.prototype.setText = function setText(newText) {
var oldText = this.text();
//create the changeset
- var changeset = Changeset.makeSplice(oldText, 0, oldText.length-1, newText);
+ var changeset = Changeset.makeSplice(oldText, 0, oldText.length, newText);
//append the changeset
this.appendRevision(changeset);