* find @-moz-doc sections faster in the editor
* only recreate widgets if section data is changed
* CodeMirror speedup: reuse the old folding marks
* add a reminder to remove the CodeMirror hack in the future
* use precise getTokenAt
* check doc type for string/comment to be more mode-agnostic
* fix setGutterMarker hack
* fix skipSpace: EOL is a space too
* move deepEqual next to deepCopy
* fix getTokenTypeAt check for some cases
* remove the unnecessary \s*
* linter and compact layout improvements
Closes#748
While investigating the best way to fix linter scrolling, when I double-checked the compact layout, an old bug I meant to fix a long time ago was immediately apparent. Basically, the linter adds/removes errors as you type, causing the editor to bounce up and down, making it practically unusable.
This PR fixes scrolling, and also collapses options and the linter in the compact layout, but always shows the collapsed linter so you're aware of the error count without the content jumping. It also collapses options in the non-compact layout if the viewport is too short to accommodate them, factoring in the min-height of the linter. All automatic collapsing factors in whether a linter is active so they can adjust accordingly, and disables the setting of collapsed state prefs, since we're deciding the pref anyway, and this allows for re-expanding on resize based on the previous pref.
It's quite possible I failed to account for certain scenarios, so try to break it. Also think it's problematic for the linter to not always be visible if enabled, so I hooked up a 40px fixed header on scroll with just the linter in it for the compact layout.
A few other little details are included. I removed redundant line and column numbers spelled out at the end of lint messages to prevent horizontal overflow. I noticed that the expand/collapse prefs do not toggle correctly when clicking directly on the details-marker arrow. Simplest solution was covering them with the `h2` (we may wanna hook up the manager as well). Also, unrelated, but I switched to opacity to hide resizing sectioned editors, because `visibility: hidden;` breaks editor auto-focus.
If either of you guys wanna fix any bugs, or improve any code, feel free to just commit to this PR directly.
* linter and compact layout improvements
* linter and compact layout improvements
* No usercss scroll listener and delay header check
* Some code tweaks
* Add: auto resize section editor on init
* Fix: calculate cm height correctly
* Fix: query heights before set
* Fix: work with small layout, hide sections before ready
* Fix search highlight conflict
Regular highlight styling and search highlight styling shouldn't both be applied at the same time. Search highlight styling should also be removed when search is closed. This PR resolves those conflicts.
* Remove unnecessary dummy animation
Not sure what the point of it ever was, but I'm pretty sure it should go.
* Update usercss-meta
* Add: translation for new errors
* Fix: define `anno.rule` in meta linter
* Fix: typo
* Fix: don't display rule id if undefined
* fixup! Fix: don't display rule id if undefined