🐎 Update lines state only in pre-measurement phase

This commit is contained in:
Antonio Scandurra
2016-02-17 10:29:38 +01:00
parent 012fa354c4
commit d05dfa6efe

View File

@@ -90,7 +90,7 @@ class TextEditorPresenter
@updateLineDecorations()
@updateBlockDecorations()
@updateTilesState()
@updateTilesState(true)
@updating = false
@state
@@ -112,7 +112,7 @@ class TextEditorPresenter
@updateHiddenInputState()
@updateContentState()
@updateHighlightDecorations() if @shouldUpdateDecorations
@updateTilesState()
@updateTilesState(false)
@updateCursorsState()
@updateOverlaysState()
@updateLineNumberGutterState()
@@ -327,7 +327,7 @@ class TextEditorPresenter
clearScreenRowsToMeasure: ->
@screenRowsToMeasure = []
updateTilesState: ->
updateTilesState: (updateLinesState) ->
return unless @startRow? and @endRow? and @lineHeight?
screenRows = @getScreenRows()
@@ -367,8 +367,9 @@ class TextEditorPresenter
gutterTile.display = "block"
gutterTile.zIndex = zIndex
@updateLinesState(tile, rowsWithinTile)
@updateLineNumbersState(gutterTile, rowsWithinTile)
if updateLinesState
@updateLinesState(tile, rowsWithinTile)
@updateLineNumbersState(gutterTile, rowsWithinTile)
visibleTiles[tileStartRow] = true
zIndex++