From 76a911f17a7e8deeb9dfdbaf45a01e72c0447443 Mon Sep 17 00:00:00 2001 From: Ben Ogle & Nathan Sobo Date: Mon, 23 Jun 2014 16:23:27 -0600 Subject: [PATCH] Render highlights immediately to support underlayer shim --- src/highlights-component.coffee | 3 ++- src/lines-component.coffee | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/highlights-component.coffee b/src/highlights-component.coffee index 292e94892..5af1840c3 100644 --- a/src/highlights-component.coffee +++ b/src/highlights-component.coffee @@ -8,7 +8,8 @@ HighlightsComponent = React.createClass displayName: 'HighlightsComponent' render: -> - div className: 'highlights', @renderHighlights() + div className: 'highlights', + @renderHighlights() if @isMounted() renderHighlights: -> {editor, highlightDecorations, lineHeightInPixels} = @props diff --git a/src/lines-component.coffee b/src/lines-component.coffee index afbeb1b57..65f8ff048 100644 --- a/src/lines-component.coffee +++ b/src/lines-component.coffee @@ -26,7 +26,7 @@ LinesComponent = React.createClass # The lines div must have the 'editor-colors' class so it has an opaque # background to avoid sub-pixel anti-aliasing problems on the GPU div {className: 'lines editor-colors', style}, - HighlightsComponent({editor, highlightDecorations, lineHeightInPixels, defaultCharWidth, scopedCharacterWidthsChangeCount}) if @isMounted() + HighlightsComponent({editor, highlightDecorations, lineHeightInPixels, defaultCharWidth, scopedCharacterWidthsChangeCount}) componentWillMount: -> @measuredLines = new WeakSet