#1428 CPP Folding incorrect

Bug
closed
nobody
Scintilla (796)
5
2012-12-31
2012-12-31
tarlou
No

'}' is not handled correctly in a line comment. The following code does not have correct folding.
if (x) {
printf("Hello");
//}
printf("here");
}

However, it is handled correctly in a block comment, i.e. changing //} to /*}*/ will give the correct folding

Discussion

  • Colomban Wendling

    This is not a bug but a feature, configurable with lexer property fold.cpp.comment.explicit. "//{" and "//}" are recognized as explicit fold points, so in your case it interacts badly since there is no open "//{".

     
  • tarlou

    tarlou - 2012-12-31

    I see... That's an interesting feature... I'll close this bug report.

     
  • tarlou

    tarlou - 2012-12-31
    • status: open --> closed
     

Log in to post a comment.