Skip to content

Commit

Permalink
trivial: Update RGA#_lastText at the end of _applyOpToEditor rather t…
Browse files Browse the repository at this point in the history
…han after updating the RGA.
  • Loading branch information
jorendorff committed Apr 12, 2016
1 parent 5b2c1b7 commit 70f1de0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rga.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ Object.assign(RGA.AceEditorRGA.prototype, {
});
break;
}

this._lastText = this.editor.getValue();
},

// Receive an op from a peer RGA or (equivalently) a socket.
Expand All @@ -506,7 +508,6 @@ Object.assign(RGA.AceEditorRGA.prototype, {
// before modifying the RGA.
this._applyOpToEditor(op); // first update the editor
this._downstream(source, op); // then call base-class method to update the RGA
this._lastText = this.editor.getValue();

this._assertInSync({op: op});
}
Expand Down

0 comments on commit 70f1de0

Please sign in to comment.