When updating folds, don't modify the array over which we're iterating

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-03-16 16:31:52 -06:00
parent 67d017f3f4
commit b31bef4ea0
2 changed files with 13 additions and 1 deletions

View File

@@ -117,7 +117,7 @@ class Renderer
handleBufferChange: (e) ->
for row, folds of @activeFolds
for fold in folds
for fold in new Array(folds...)
changeInsideFold = true if fold.handleBufferChange(e)
unless changeInsideFold