From 693a4956188730aa2e32eb75ed2e9df958e9a10d Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Tue, 23 Apr 2013 12:01:16 -0700 Subject: [PATCH] Use _.spliceWithArray in tokenized buffer --- src/app/tokenized-buffer.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/tokenized-buffer.coffee b/src/app/tokenized-buffer.coffee index 02bd59ad0..b6ee2c8c2 100644 --- a/src/app/tokenized-buffer.coffee +++ b/src/app/tokenized-buffer.coffee @@ -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)