From fe82e3e30f2befc9975598488d0fb248313baae7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 16 May 2014 14:52:12 -0600 Subject: [PATCH] Only clear screen row caches on lines component if lineHeight changes --- src/lines-component.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lines-component.coffee b/src/lines-component.coffee index 1078a3b3b..384c7257e 100644 --- a/src/lines-component.coffee +++ b/src/lines-component.coffee @@ -44,10 +44,8 @@ LinesComponent = React.createClass false componentDidUpdate: (prevProps) -> - unless isEqualForProperties(prevProps, @props, 'fontSize', 'fontFamily', 'lineHeight') - @clearScreenRowCaches() - @measureLineHeightAndCharWidth() - + @measureLineHeightAndCharWidth() unless isEqualForProperties(prevProps, @props, 'fontSize', 'fontFamily', 'lineHeight') + @clearScreenRowCaches() unless prevProps.lineHeight is @props.lineHeight @updateLines() @clearScopedCharWidths() unless isEqualForProperties(prevProps, @props, 'fontSize', 'fontFamily') @measureCharactersInNewLines() unless @props.scrollingVertically