Resample background colors whenever stylesheets change

This prevents a flicker that occurred on theme changes when we just
detected this via polling. I'm going to leave the polling as a catch-all
in case the editor is styled inline in some way.
This commit is contained in:
Nathan Sobo 2014-07-24 17:25:04 -07:00
parent 7738eeeacc
commit 85363f8eaa

View File

@ -679,6 +679,7 @@ EditorComponent = React.createClass
onStylesheetsChanged: (stylesheet) ->
@refreshScrollbars() if @containsScrollbarSelector(stylesheet)
@sampleBackgroundColors()
@remeasureCharacterWidthsIfVisibleAfterNextUpdate = true
@requestUpdate() if @visible