mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Reset shouldUpdate... variables
This commit is contained in:
@@ -94,10 +94,27 @@ class TextEditorPresenter
|
||||
@updateCustomGutterDecorationState() if @shouldUpdateCustomGutterDecorationState
|
||||
@updating = false
|
||||
|
||||
throw new Error("Reset @shouldUpdateBlaBla variables to `false`!!!")
|
||||
@resetShouldUpdateStates()
|
||||
|
||||
@state
|
||||
|
||||
resetShouldUpdateStates: ->
|
||||
@shouldUpdateFocusedState = false
|
||||
@shouldUpdateHeightState = false
|
||||
@shouldUpdateVerticalScrollState = false
|
||||
@shouldUpdateHorizontalScrollState = false
|
||||
@shouldUpdateScrollbarsState = false
|
||||
@shouldUpdateHiddenInputState = false
|
||||
@shouldUpdateContentState = false
|
||||
@shouldUpdateDecorations = false
|
||||
@shouldUpdateLinesState = false
|
||||
@shouldUpdateCursorsState = false
|
||||
@shouldUpdateOverlaysState = false
|
||||
@shouldUpdateLineNumberGutterState = false
|
||||
@shouldUpdateLineNumbersState = false
|
||||
@shouldUpdateGutterOrderState = false
|
||||
@shouldUpdateCustomGutterDecorationState = false
|
||||
|
||||
observeModel: ->
|
||||
@disposables.add @model.onDidChange =>
|
||||
@updateContentDimensions()
|
||||
@@ -229,6 +246,8 @@ class TextEditorPresenter
|
||||
@updateGutterOrderState()
|
||||
@updateCustomGutterDecorationState()
|
||||
|
||||
@resetShouldUpdateStates()
|
||||
|
||||
updateFocusedState: -> @batch "shouldUpdateFocusedState", ->
|
||||
@state.focused = @focused
|
||||
|
||||
|
||||
Reference in New Issue
Block a user