Treat deltas with empty ranges as NOOPs
This commit is contained in:
parent
ddd695ee3f
commit
35a27fd1ba
1 changed files with 4 additions and 0 deletions
|
|
@ -569,6 +569,10 @@ var Document = function(textOrLines) {
|
|||
**/
|
||||
this.applyDelta = function(delta, doNotValidate) {
|
||||
|
||||
// An empty range is a NOOP.
|
||||
if (delta.range.isEmpty())
|
||||
return;
|
||||
|
||||
// Split large insert deltas. This is necessary because:
|
||||
// 1. We need to support splicing delta lines into the document via $lines.splice.apply(...)
|
||||
// 2. fn.apply() doesn't work for a large number of params. The mallest threshold is on safari 0xFFFF.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue