presenter: 🔥 redundant decoration state updates

This commit is contained in:
Max Brunsfeld
2015-06-05 13:31:24 -07:00
parent 2337254afb
commit 2732e0dcac

View File

@@ -1134,8 +1134,6 @@ class TextEditorPresenter
@shouldUpdateLineNumbersState = true
else if decoration.isType('gutter')
@shouldUpdateCustomGutterDecorationState = true
if decoration.isType('highlight')
@updateHighlightState(decoration)
if decoration.isType('overlay')
@shouldUpdateOverlaysState = true
@@ -1145,14 +1143,14 @@ class TextEditorPresenter
@observeDecoration(decoration)
if decoration.isType('line') or decoration.isType('gutter')
@addToLineDecorationCaches(decoration, decoration.getMarker().getScreenRange())
@shouldUpdateDecorations = true
@shouldUpdateTilesState = true if decoration.isType('line')
if decoration.isType('line-number')
@shouldUpdateLineNumbersState = true
else if decoration.isType('gutter')
@shouldUpdateCustomGutterDecorationState = true
else if decoration.isType('highlight')
@updateHighlightState(decoration)
@shouldUpdateDecorations = true
else if decoration.isType('overlay')
@shouldUpdateOverlaysState = true
@@ -1357,7 +1355,6 @@ class TextEditorPresenter
@shouldUpdateHiddenInputState = true
@pauseCursorBlinking()
@updateCursorState(cursor)
@emitDidUpdateState()
startBlinkingCursors: ->