Merge pull request #7129 from atom/mb-fix-redundant-updates

Avoid redundant decoration state updates in presenter
This commit is contained in:
Max Brunsfeld 2015-06-05 14:06:10 -07:00
commit df7297e709

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: ->