Go to file
Thiemo Kreuz a43acbeb6b Activate bracket matching for longer lines
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
2021-01-14 11:28:02 +00:00
.phan Add phan 2019-04-09 20:35:56 +02:00
i18n Localisation updates from https://translatewiki.net. 2020-12-28 10:37:43 +01:00
includes Provide cookie workaround for setting the feature flag 2021-01-04 16:09:11 +01:00
resources Activate bracket matching for longer lines 2021-01-14 11:28:02 +00:00
tests Browser tests for CodeMirror (wikitext 2017 editor) 2021-01-11 12:47:49 +01:00
.eslintrc.json build: Update devDependencies 2020-06-12 22:51:38 +01:00
.gitignore Browser tests for CodeMirror (wikitext 2010 editor) 2021-01-08 11:01:13 +01:00
.gitreview Whoops, track not trace 2016-10-24 17:02:17 -07:00
.phpcs.xml Remove @staticvar doc annotation 2018-09-09 20:04:35 +02:00
.stylelintrc.json Update CodeMirror to 5.58.3 2020-12-07 20:20:49 +00:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 10:46:12 +00:00
composer.json build: Updating mediawiki/mediawiki-phan-config to 0.10.6 2020-12-19 12:42:09 +00:00
COPYING CodeMirror: Add COPYING file and credit for CodeMirror authors 2020-03-02 21:34:06 +00:00
extension.json Added bracket matching 2020-12-15 13:09:06 +00:00
Gruntfile.js Added bracket matching 2020-12-15 13:09:06 +00:00
package-lock.json Browser tests for CodeMirror (wikitext 2010 editor) 2021-01-08 11:01:13 +01:00
package.json Browser tests for CodeMirror (wikitext 2010 editor) 2021-01-08 11:01:13 +01:00