diff --git a/lib/ace/document.js b/lib/ace/document.js index b8379854..3cae6399 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -326,6 +326,8 @@ var Document = function(text) { if (lines.length == 0) return {row: row, column: 0}; + // apply doesn't work for big arrays (smallest threshold is on safari 0xFFFF) + // to circumvent that we have to break huge inserts into smaller chunks here if (lines.length > 0xFFFF) { var end = this.insertLines(row, lines.slice(0xFFFF)); lines = lines.slice(0, 0xFFFF);