Render highlights immediately to support underlayer shim

This commit is contained in:
Ben Ogle & Nathan Sobo
2014-06-23 16:23:27 -06:00
parent 7139fd9f98
commit 76a911f17a
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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