add comment
This commit is contained in:
parent
505b1fc3c6
commit
ac5e033149
1 changed files with 2 additions and 0 deletions
|
|
@ -326,6 +326,8 @@ var Document = function(text) {
|
||||||
if (lines.length == 0)
|
if (lines.length == 0)
|
||||||
return {row: row, column: 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) {
|
if (lines.length > 0xFFFF) {
|
||||||
var end = this.insertLines(row, lines.slice(0xFFFF));
|
var end = this.insertLines(row, lines.slice(0xFFFF));
|
||||||
lines = lines.slice(0, 0xFFFF);
|
lines = lines.slice(0, 0xFFFF);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue