Splice in new DisplayBuffer lines in chunks to avoid stack overflows

This commit is contained in:
Nathan Sobo
2015-05-08 00:54:31 +02:00
parent fabfd2a68f
commit 0d310c767f

View File

@@ -1120,7 +1120,7 @@ class DisplayBuffer extends Model
{screenLines, regions} = @buildScreenLines(startBufferRow, endBufferRow + bufferDelta)
screenDelta = screenLines.length - (endScreenRow - startScreenRow)
@screenLines[startScreenRow...endScreenRow] = screenLines
_.spliceWithArray(@screenLines, startScreenRow, endScreenRow - startScreenRow, screenLines, 10000)
@rowMap.spliceRegions(startBufferRow, endBufferRow - startBufferRow, regions)
@findMaxLineLength(startScreenRow, endScreenRow, screenLines, screenDelta)