From 5a1459cf0a1abe02f20fab1a2d6864f5a13320b7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 5 Oct 2017 15:01:46 -0600 Subject: [PATCH] Clear the dimensions cache after updating the soft wrap column Updating the soft wrap column could cause us to compute different values for derived dimensions, so any dimensions that were cached *in the process* of updating the soft wrap column need to be cleared. --- src/text-editor-component.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text-editor-component.js b/src/text-editor-component.js index 5667a733e..8dda2297d 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -2118,6 +2118,7 @@ class TextEditorComponent { // rendered start row accurately. 😥 this.populateVisibleRowRange(renderedStartRow) this.props.model.setEditorWidthInChars(this.getScrollContainerClientWidthInBaseCharacters()) + this.derivedDimensionsCache = {} this.suppressUpdates = false }