diff --git a/lib/ace/document.js b/lib/ace/document.js index c4f8a9eb..e203d77c 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -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.