[16.0.25] Code folding doesn't work for nested case statements

The following code demonstrates the behaviour.

BEGIN
   CASE 1
      WHEN 2
      THEN
         SELECT CASE dummy WHEN 1 THEN 2 ELSE 3 END FROM DUAL;
      WHEN 3
      THEN
         NULL;
      ELSE
         NULL;
   END CASE;

   NULL;
END;

Clicking on the [-] in line 4 (first THEN) the editor shows:
Bildschirmfoto 2022-03-03 um 12.50.40

If I replace the SELECT statement in line 5 with NULL; it works as expected:
Bildschirmfoto 2022-03-03 um 12.53.26

Do you have a timeline yet for when this might be fixed?

Sorry, I think we missed this. I logged it so it isn't forgotten.

1 Like

Hi all
Found a workaround >> just insert at some places comment "-" and toad folds as it should be.
image

would be nice to see a fix, but I prefer some "--" every now and then to make folding

Chris