fix line number highlighting after mode changes

- Closes #764
main
Mike Fix 6 years ago
parent 2bf33aa85a
commit 7a3930cae6

@ -33,6 +33,16 @@ class Carbon extends React.PureComponent {
onChange: () => {}
}
componentDidUpdate(prevProps) {
// TODO keep opacities in state
if (
prevProps.config.theme != this.props.config.theme ||
prevProps.config.language != this.props.config.language
) {
this.prevLine = null
}
}
handleLanguageChange = debounce(
(newCode, language) => {
if (language === 'auto') {

Loading…
Cancel
Save