Packages icon indicating copy to clipboard operation
Packages copied to clipboard

[D] `case` statements unfoldable

Open deathaxe opened this issue 3 years ago • 0 comments

Expected behavior

Code between case should be foldable in D as it is in C/C++.

switch (a) {

   case 0:
      // not foldable code
      break;

   case 1:
      // not foldable code
      break;
}

Actual behavior

The code between case statements is not foldable, because indentation based folding is disabled for D and no syntax based folding rules exist for such expressions.

Steps to reproduce

  1. Paste the code into a new view
  2. Set syntax to D
  3. Hover the gutter (no folding buttons appear on line 3 and 7)

deathaxe avatar Dec 16 '22 10:12 deathaxe