[scintilla:bugs] #2442 Issue with automatic folding and SC_FOLDLEVELWHITEFLAG

0 views
Skip to first unread message

Martijn Laan

unread,
Jun 19, 2024, 2:34:50 PM6/19/24
to scintill...@googlegroups.com

[bugs:#2442] Issue with automatic folding and SC_FOLDLEVELWHITEFLAG

Status: open
Group: Bug
Labels: scintilla
Created: Wed Jun 19, 2024 06:34 PM UTC by Martijn Laan
Last Updated: Wed Jun 19, 2024 06:34 PM UTC
Owner: nobody
Attachments:

I'm seeing the following odd behaviour in a container which has SC_AUTOMATICFOLD_SHOW, SC_AUTOMATICFOLD_CLICK and SC_AUTOMATICFOLD_CHANGE all on.

  1. The initial set of the level numbers is shown in screenshot 1.
  2. Note how there are 3 lines with whitespace flags.
  3. Then I click the minus sign.
  4. Scintilla auto contracts the fold as expected, as shown in screenshot 2.
  5. Then I type a space in the middle of the word 'Setup'
  6. This makes the contrainer change the level numbers as shown in screenshot 3 which includes removing the first header flag.
  7. In this screenshot it can also be seen that Scintilla auto expanded the fold as expected
  8. However 2 of the 3 lines with the whitespace flags are still invisible. This is the issue.
  9. Then I remove the space again.
  10. This makes the contrainer change the level numbers once more, back to the initial state.
  11. All 3 whitespace lines are visible again, as shown in screenshot 4.

The issue does not appear when I click the plus sign instead in step 5.

I tried looking at Scintilla's folding code but it was too complicated for me to debug the issue.

Thanks!

Greetings,
Martijn Laan


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Neil Hodgson

unread,
Jul 16, 2024, 6:37:45 PM7/16/24
to scintill...@googlegroups.com

You should add the file to this issue and name the lexer being used.

This makes the contrainer change the level numbers

So it's not a lexer producing the folding but the container?

That's an unusual situation now. Its possible that this scenario isn't compatible with automatic folding and folding will have to be implemented in the application like it was before automatic was added.

Martijn Laan

unread,
Jul 17, 2024, 1:06:07 AM7/17/24
to scintill...@googlegroups.com

Correct, no lexer is involved.


[bugs:#2442] Issue with automatic folding and SC_FOLDLEVELWHITEFLAG

Status: open
Group: Bug
Labels: scintilla
Created: Wed Jun 19, 2024 06:34 PM UTC by Martijn Laan

Last Updated: Tue Jul 16, 2024 10:37 PM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Jul 17, 2024, 7:20:35 AM7/17/24
to scintill...@googlegroups.com

The format appears similar to SciTE's properties file format so I wrote a similar file and set the language to Properties. This reproduced the levels and header and whitespace line states. For properties, bracketed section headers may contain spaces so a different way of unfolding is needed which can be done by removing the initial '[' . Contracted the first line then removed the '[' to unfold which revealed all the lines including the whitespace lines. Therefore, it appears the problem doesn't reproduce with SciTE.


[bugs:#2442] Issue with automatic folding and SC_FOLDLEVELWHITEFLAG

Status: open
Group: Bug
Labels: scintilla
Created: Wed Jun 19, 2024 06:34 PM UTC by Martijn Laan

Last Updated: Wed Jul 17, 2024 05:05 AM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Aug 12, 2024, 7:09:19 PM8/12/24
to scintill...@googlegroups.com
  • status: open --> open-works-for-me

[bugs:#2442] Issue with automatic folding and SC_FOLDLEVELWHITEFLAG

Status: open-works-for-me


Group: Bug
Labels: scintilla
Created: Wed Jun 19, 2024 06:34 PM UTC by Martijn Laan

Last Updated: Wed Jul 17, 2024 11:20 AM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Mar 25, 2026, 7:04:24 PM (11 days ago) Mar 25
to scintill...@googlegroups.com
  • status: open-works-for-me --> closed-works-for-me

[bugs:#2442] Issue with automatic folding and SC_FOLDLEVELWHITEFLAG

Status: closed-works-for-me


Group: Bug
Labels: scintilla
Created: Wed Jun 19, 2024 06:34 PM UTC by Martijn Laan

Last Updated: Mon Aug 12, 2024 11:09 PM UTC
Owner: nobody
Attachments:

Reply all
Reply to author
Forward
0 new messages