Use _.spliceWithArray in tokenized buffer

This commit is contained in:
Corey Johnson & Nathan Sobo
2013-04-23 12:01:16 -07:00
parent 987d1da233
commit 693a495618

View File

@@ -126,7 +126,8 @@ class TokenizedBuffer
@updateInvalidRows(start, end, delta)
previousEndStack = @stackForRow(end) # used in spill detection below
@screenLines[start..end] = @buildScreenLinesForRows(start, end + delta, @stackForRow(start - 1))
newScreenLines = @buildScreenLinesForRows(start, end + delta, @stackForRow(start - 1))
_.spliceWithArray(@screenLines, start, end - start + 1, newScreenLines)
newEndStack = @stackForRow(end + delta)
if newEndStack and not _.isEqual(newEndStack, previousEndStack)