mirror of
https://github.com/atom/atom.git
synced 2026-02-14 00:25:08 -05:00
presenter: 🔥 redundant decoration state updates
This commit is contained in:
@@ -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: ->
|
||||
|
||||
Reference in New Issue
Block a user