Skip to content

1.0.0: Require showLineNumber = off and correctly unload CM5 version

Latest
Compare
Choose a tag to compare
@thisdotrob thisdotrob released this 05 Feb 20:44
The CM6 extension already required showLineNumber to be off (otherwise
it would display both normal and relative line number gutters side by
side.

Before this commit the legacy extension required this setting to be on,
since it updates the formatter on the existing gutter. This also meant
we had to listen to config changes to disable and enable this plugin
internally when that setting was changed.

To keep things simpler, this commit makes it so both legacy and non-
legacy modes require the showLineNumer setting to be off. That way the
readme can state this requirement once and be done with it. The legacy
mode will actually still work if the setting is on or off, but if it is
off it will now internally enable the line number gutter via
`cm.setOption("lineNumbers", true)` (and restore this setting when
unloading).