Sublime Forum

Bug: C++ code with completely wrong folding

#1

I have a C++ file where the code folding is completely wrong.
I tried to attach that file here, but only the images are allowed as attachments.
Please take a look at the screenshot:


The errors here are:

  • Line 37: a single-line comment opens a fold block (???)
  • Line 62: a single-line comment opens a fold block (???)
  • Line 73: a single-line comment opens a fold block (???)
    As a consequence, real foldings at higher levels (for example, the for-loop and the if-block shown on the screenshot) do not work correctly.
0 Likes

#2

And one more screenshot:

  • Line 97 opens a fold block (???)
0 Likes

#3

Folding works by indention levels only. Syntax semantics are not respected.

0 Likes

#4

OMG, the folding driven by indentations does not look good to me. In such case, only Python (and other indentation-based languages, if any) has the correct folding in all cases…

0 Likes