Skip to content

Commit 60e3155

Browse files
committed
2.3.4 fix mv2 editor initialization
1 parent 00a5666 commit 60e3155

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Stylus",
3-
"version": "2.3.3",
3+
"version": "2.3.4",
44
"description": "Redesign the web with Stylus, a user styles manager",
55
"license": "GPL-3.0-only",
66
"repository": "openstyles/stylus",

src/edit/source-editor.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ export default function SourceEditor() {
4444
editor.viewTo = si.viewTo;
4545
sectionFinder = MozSectionFinder(me);
4646
sectionWidget = MozSectionWidget(me, sectionFinder);
47-
prefs.subscribe('editor.linter', updateLinterSwitch, true);
4847
prefs.subscribe('editor.appliesToLineWidget',
4948
(k, val) => sectionWidget.toggle(val), true);
50-
prefs.subscribe('editor.toc.expanded',
51-
(k, val) => sectionFinder.onOff(editor.updateToc, val), true);
5249
Object.assign(me.curOp, si.scroll);
5350
editor.viewTo = 0;
5451
},
@@ -70,6 +67,10 @@ export default function SourceEditor() {
7067
updateMeta();
7168
});
7269
updateMeta();
70+
// Subsribing outside of finishInit() because it uses `cm` that's still not initialized
71+
prefs.subscribe('editor.linter', updateLinterSwitch, true);
72+
prefs.subscribe('editor.toc.expanded',
73+
(k, val) => sectionFinder.onOff(editor.updateToc, val), true);
7374

7475
/** @namespace Editor */
7576
Object.assign(editor, {

src/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Stylus",
3-
"version": "2.3.3",
3+
"version": "2.3.4",
44
"minimum_chrome_version": "",
55
"description": "__MSG_description__",
66
"homepage_url": "https://add0n.com/stylus.html",

0 commit comments

Comments
 (0)