From 0940c9216f4c95099cf6612d6dca5b7279b5e7dd Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 9 Mar 2015 09:11:39 +0100 Subject: [PATCH] Update also @startRow and @endRow on `getState` --- src/text-editor-presenter.coffee | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 70eef98a9..ebcc5a5ca 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -61,6 +61,7 @@ class TextEditorPresenter @[flagName] = true else fn.apply(this) + @[flagName] = false @emitDidUpdateState() @@ -69,6 +70,11 @@ class TextEditorPresenter getState: -> @updating = true + @updateContentDimensions() + @updateScrollbarDimensions() + @updateStartRow() + @updateEndRow() + @updateFocusedState() if @shouldUpdateFocusedState @updateHeightState() if @shouldUpdateHeightState @updateVerticalScrollState() if @shouldUpdateVerticalScrollState @@ -83,20 +89,6 @@ class TextEditorPresenter @updateGutterState() if @shouldUpdateGutterState @updateLineNumbersState() if @shouldUpdateLineNumbersState - @shouldUpdateFocusedState = false - @shouldUpdateHeightState = false - @shouldUpdateVerticalScrollState = false - @shouldUpdateHorizontalScrollState = false - @shouldUpdateScrollbarsState = false - @shouldUpdateHiddenInputState = false - @shouldUpdateContentState = false - @shouldUpdateDecorations = false - @shouldUpdateLinesState = false - @shouldUpdateCursorsState = false - @shouldUpdateOverlaysState = false - @shouldUpdateGutterState = false - @shouldUpdateLineNumbersState = false - @updating = false @state