Skip to content

Indent seems have the highest privilege in folding #7955

@cloud-yu

Description

@cloud-yu

I've got some code like following

void func()
{   //<----  1
    if (1)
    {  //<---- 2
        if (1)
        {
            return;
        }
#if 0
        else
        {
            return;
        }
#endif
        if (1)
        {
            return;
        }
    }
}
  1. when code folding starts at point 1 or point 2, it ends before condition compile statetment (#if 0)
  2. condition compile statement works well start from #if end with #endif. But why this allows folding starts from #endif,end before the ending of function?

so, i got some questions:

  1. indentation seems the highest privilege folding strategy, in other editor like source insight, "bracket pairs" strategy works well.
  2. why #endif could be a start place for code folding ?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions