Rename SelectionView.destroyed to .needsRemoval to match CursorView

This commit is contained in:
Nathan Sobo
2013-04-04 19:06:28 -06:00
parent f6bfab5dd7
commit 7b7c77645c
2 changed files with 3 additions and 3 deletions

View File

@@ -796,7 +796,7 @@ class Editor extends View
@newSelections = []
for selectionView in @getSelectionViews()
if selectionView.destroyed
if selectionView.needsRemoval
selectionView.remove()
else
selectionView.updateDisplay()

View File

@@ -8,13 +8,13 @@ class SelectionView extends View
@div class: 'selection'
regions: null
destroyed: false
needsRemoval: false
initialize: ({@editor, @selection} = {}) ->
@regions = []
@selection.on 'screen-range-changed', => @editor.requestDisplayUpdate()
@selection.on 'destroyed', =>
@destroyed = true
@needsRemoval = true
@editor.requestDisplayUpdate()
updateDisplay: ->