|
@@ -3504,10 +3504,20 @@
|
|
|
}, 500);
|
|
}, 500);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ var locateSubscription = huePubSub.subscribe('editor.refresh.statement.locations', function (snippet) {
|
|
|
|
|
+ if (snippet === self.snippet) {
|
|
|
|
|
+ window.clearTimeout(changeThrottle);
|
|
|
|
|
+ window.clearTimeout(updateThrottle);
|
|
|
|
|
+ parseForStatements();
|
|
|
|
|
+ updateActiveStatement();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
self.disposeFunctions.push(function () {
|
|
self.disposeFunctions.push(function () {
|
|
|
window.clearTimeout(changeThrottle);
|
|
window.clearTimeout(changeThrottle);
|
|
|
window.clearTimeout(updateThrottle);
|
|
window.clearTimeout(updateThrottle);
|
|
|
self.editor.off("change", changeListener);
|
|
self.editor.off("change", changeListener);
|
|
|
|
|
+ locateSubscription.remove();
|
|
|
cursorSubscription.remove();
|
|
cursorSubscription.remove();
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|