usercss: force-refresh codemirror on saving to repaint vars

This commit is contained in:
tophf 2017-11-29 13:27:55 +03:00
parent b995a9d316
commit 260cbddae0

View File

@ -215,6 +215,7 @@ function createSourceEditor(style) {
sourceCode: cm.getValue(), sourceCode: cm.getValue(),
})) }))
.then(replaceStyle) .then(replaceStyle)
.then(() => cm.setOption('mode', cm.doc.mode))
.catch(err => { .catch(err => {
if (err.message === t('styleMissingMeta', 'name')) { if (err.message === t('styleMissingMeta', 'name')) {
messageBox.confirm(t('usercssReplaceTemplateConfirmation')).then(ok => ok && messageBox.confirm(t('usercssReplaceTemplateConfirmation')).then(ok => ok &&