www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19351] New: add code folding for case statements

https://issues.dlang.org/show_bug.cgi?id=19351

          Issue ID: 19351
           Summary: add code folding for case statements
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: visuald
          Assignee: nobody puremagic.com
          Reporter: r.sagitario gmx.de

from https://forum.dlang.org/thread/vkqydzejtiljfodicnnt forum.dlang.org:

can't collapse/fold a case statement in the editor for some reason ;/ 

case statements are blocks. They might not be represented as such but they are
semantically the same as blocks. The representation is irrelevant. Since, in D,
every case must end with a break or return or throw, it means that the next
case terminates the block automatically.

So, all that needs to be done, if it is possible is to collapse everything up
to the next case statement or terminal }.

--
Nov 03 2018