mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Buffer changes updates a stable list of folds
This commit is contained in:
@@ -127,9 +127,9 @@ class Renderer
|
||||
@lineMap.clipScreenPosition(position, options)
|
||||
|
||||
handleBufferChange: (e) ->
|
||||
for row, folds of @activeFolds
|
||||
for fold in new Array(folds...)
|
||||
fold.handleBufferChange(e)
|
||||
allFolds = [] # Folds can modify @activeFolds, so first make sure we have a stable array of folds
|
||||
allFolds.push(folds...) for row, folds of @activeFolds
|
||||
fold.handleBufferChange(e) for fold in allFolds
|
||||
|
||||
@handleHighlighterChange(@lastHighlighterChangeEvent)
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ class Selection extends View
|
||||
@editor.getCurrentMode().autoOutdent(state, new AceOutdentAdaptor(@editor.buffer, @editor), bufferRow)
|
||||
|
||||
backspace: ->
|
||||
@editor.destroyFoldsContainingBufferRow(@getBufferRange().end.row)
|
||||
@selectLeft() if @isEmpty()
|
||||
@deleteSelectedText()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user