diff --git a/spec/text-editor-component-spec.js b/spec/text-editor-component-spec.js index 8aaccbd6c..08da07dd8 100644 --- a/spec/text-editor-component-spec.js +++ b/spec/text-editor-component-spec.js @@ -544,7 +544,7 @@ describe('TextEditorComponent', function () { editor.setSoftWrapped(true) await nextViewUpdatePromise() - componentNode.style.width = 17 * charWidth + wrapperNode.getVerticalScrollbarWidth() + 'px' + componentNode.style.width = 16 * charWidth + wrapperNode.getVerticalScrollbarWidth() + 'px' component.measureDimensions() await nextViewUpdatePromise() }) diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 3266eea70..a3504caa8 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -90,7 +90,7 @@ class TextEditorPresenter @updateLineDecorations() @updateBlockDecorations() - @updateTilesState(true) + @updateTilesState() @updating = false @state @@ -112,7 +112,7 @@ class TextEditorPresenter @updateHiddenInputState() @updateContentState() @updateHighlightDecorations() if @shouldUpdateDecorations - @updateTilesState(false) + @updateTilesState() @updateCursorsState() @updateOverlaysState() @updateLineNumberGutterState() @@ -327,7 +327,7 @@ class TextEditorPresenter clearScreenRowsToMeasure: -> @screenRowsToMeasure = [] - updateTilesState: (updateLinesState) -> + updateTilesState: -> return unless @startRow? and @endRow? and @lineHeight? screenRows = @getScreenRows() @@ -367,9 +367,8 @@ class TextEditorPresenter gutterTile.display = "block" gutterTile.zIndex = zIndex - if updateLinesState - @updateLinesState(tile, rowsWithinTile) - @updateLineNumbersState(gutterTile, rowsWithinTile) + @updateLinesState(tile, rowsWithinTile) + @updateLineNumbersState(gutterTile, rowsWithinTile) visibleTiles[tileStartRow] = true zIndex++