only recalc applies-to css on live-update if style targets the editor

This commit is contained in:
tophf 2019-10-13 20:59:50 +03:00
parent 5459130111
commit c0fd71dda6

View File

@ -173,6 +173,10 @@ function createAppliesToLineWidget(cm) {
}
function onRuntimeMessage(msg) {
if (msg.reason === 'editPreview' && !$(`#stylus-${msg.style.id}`)) {
// no style element with this id means the style doesn't apply to the editor URL
return;
}
if (msg.style || msg.styles ||
msg.prefs && 'disableAll' in msg.prefs ||
msg.method === 'styleDeleted') {