From e1d5485516553cf830e38c49e01db436de064125 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 29 Apr 2015 09:13:27 +0200 Subject: [PATCH] :art: --- src/text-editor-presenter.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 26c9627da..d698b04d8 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -82,11 +82,11 @@ class TextEditorPresenter @updateCustomGutterDecorationState() if @shouldUpdateCustomGutterDecorationState @updating = false - @resetShouldUpdateStates() + @resetTrackedUpdates() @state - resetShouldUpdateStates: -> + resetTrackedUpdates: -> @shouldUpdateFocusedState = false @shouldUpdateHeightState = false @shouldUpdateVerticalScrollState = false @@ -126,7 +126,6 @@ class TextEditorPresenter @emitDidUpdateState() @disposables.add @model.onDidChangeMini => - @updateScrollbarDimensions() @shouldUpdateScrollbarsState = true @shouldUpdateContentState = true @shouldUpdateDecorations = true @@ -135,13 +134,14 @@ class TextEditorPresenter @shouldUpdateLineNumbersState = true @shouldUpdateGutterOrderState = true @shouldUpdateCustomGutterDecorationState = true - @updateCommonGutterState() # TODO: check out later... + @updateScrollbarDimensions() + @updateCommonGutterState() @emitDidUpdateState() @disposables.add @model.onDidChangeLineNumberGutterVisible => @shouldUpdateLineNumberGutterState = true @shouldUpdateGutterOrderState = true - @updateCommonGutterState() # TODO: check out later... + @updateCommonGutterState() @emitDidUpdateState() @disposables.add @model.onDidAddDecoration(@didAddDecoration.bind(this)) @@ -183,7 +183,7 @@ class TextEditorPresenter @showLineNumbers = newValue @shouldUpdateLineNumberGutterState = true @shouldUpdateGutterOrderState = true - @updateCommonGutterState() # TODO: check this out + @updateCommonGutterState() @emitDidUpdateState() @@ -192,7 +192,7 @@ class TextEditorPresenter @shouldUpdateContentState = true @shouldUpdateLineNumberGutterState = true @shouldUpdateGutterOrderState = true - @updateCommonGutterState() # TODO: check this out + @updateCommonGutterState() @emitDidUpdateState() @@ -237,7 +237,7 @@ class TextEditorPresenter @updateGutterOrderState() @updateCustomGutterDecorationState() - @resetShouldUpdateStates() + @resetTrackedUpdates() updateFocusedState: -> @state.focused = @focused