Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Comments Folding Block Issue - Please Help! #259

Open
mattbriggsuk opened this issue Jul 23, 2023 · 0 comments
Open

Code Comments Folding Block Issue - Please Help! #259

mattbriggsuk opened this issue Jul 23, 2023 · 0 comments

Comments

@mattbriggsuk
Copy link

Hi,

How is it possible to disable folding blocks within code comments?

        // Code Comments
        e.SetFoldingMarkers(@"/\*(.*)", @"\*/", RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);

        // Example Code
        e.SetFoldingMarkers(@"foo",     @"bar", RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);

There should not be any folding markers against foo-bar within /* */ comments, .i.e:

/*
foo
bar
*/

I want to avoid using RegEx Lookbehind and Lookaheads, as this is likely to cause performance issues.

What would be the best approach?

  • Introduce an overload within the SetFoldingMarkers method to indicate no sub-folding blocks?
  • Do something within fctb_VisibleRangeChanged, fctb_VisibleRangeChangedDelayed, fctb_TextChangedDelayed etc.?
  • Do something with the fctb.FindEndOfFoldingBlockStrategy ?
  • Something else?

The bug exists within the PowerfulCSharpEditor example provided:

code_comment_bug

Any help or suggestions would be greatly appreciated, as I would like to give my end-users the best user experience possible,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant