Inconsistent documentation for margin masks

25 views
Skip to first unread message

Mitchell

unread,
Apr 16, 2025, 7:12:38 PMApr 16
to scintilla-interest
Hi Neil,

The documentation for margins says "Margin 2 is set to display the folding symbols, but is given a width of 0, so it is hidden.” However, the code for margin 2 says "ms[2] = MarginStyle(MarginType::Symbol);” I’ve confirmed that by default, Scintilla does not show fold symbols in the second margin.

Which is the desired behavior?

Cheers,
Mitchell

Mitchell

unread,
Apr 16, 2025, 7:19:27 PMApr 16
to scintilla...@googlegroups.com
Hi,

> On Apr 16, 2025, at 7:12 PM, Mitchell <co...@foicica.com> wrote:
>
> Hi Neil,
>
> The documentation for margins says "Margin 2 is set to display the folding symbols, but is given a width of 0, so it is hidden.” However, the code for margin 2 says "ms[2] = MarginStyle(MarginType::Symbol);” I’ve confirmed that by default, Scintilla does not show fold symbols in the second margin.

Sorry, I meant the third margin, the one at index 2, does not show fold symbols by default.

Cheers,
Mitchell

Neil Hodgson

unread,
Apr 16, 2025, 9:54:09 PMApr 16
to scintilla-interest
Looking through history, it appears that the documentation describes aspects of the implementation that were true at different points. Then the margin was hidden by default and its mask set to 0 instead of all the fold symbols.

It would likely be better behaviour for new projects to restore the fold symbol mask for margin 2 but that may cause unwanted change to existing applications. Probably best to err on the side of caution by continuing the current behaviour and changing the documentation to omit 'folding symbols'. so:

"Margin 2 is a symbol margin that is given a width of 0, so it is hidden."

Neil

Mitchell

unread,
Apr 19, 2025, 11:11:19 AMApr 19
to scintilla...@googlegroups.com
Hi Neil,
That’s fine. My application will continue to define a fold symbol mask for margin 2 then.

Cheers,
Mitchell
Reply all
Reply to author
Forward
0 new messages