mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
a43acbeb6b
The addon does have 3 settings: - maxHighlightLineLength is for the current line where the cursor is. Bracket matching is simply not done when the current line is longer. The default is 1000, which is rather low. - maxScanLineLength is for every other line that is scanned in the process. I don't understand why, but this limit is 10x higher. - maxScanLines is the number of lines that can be scanned. Simply raising the first to be 10000 as well fixes our issue. Note that CodeMirror does have a limit of 10000 anyway. It's called maxHighlightLength there. Lines that are longer get syntax highlighting only for the first 10000 characters. The rest of the line is black. Using the same limit in the addon makes it's behavior consistent. Means: The user can see when the syntax highlighting stops, and bracket matching stops working the same time. I benchmarked with both settings. It doesn't have a measurable effect. Bracket matching is done in <1ms in both cases. Bug: T270237 Change-Id: Ia56bf4c2fb023c9f117376242221d39f51196173 |
||
---|---|---|
.phan | ||
i18n | ||
includes | ||
resources | ||
tests | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintrc.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gruntfile.js | ||
package-lock.json | ||
package.json |