How to use Fold all in Cursors

Hello again,
I'm also using Cursors like example below and I can't figure it out how can I collapse whole code (which have "-" in front using command Fold All so Cursor itself won't collapse but only code inside?
I would at least expect that when I click "+" in front code Cursor( I would see collapsed code inside that cursor but it isn't. It's all unfolded, ie. is not recursed to sublevels, only at top level. So if I wan't to see my whole code with more then e.g 1.000 lines inside main cursor I have to do that manually by clicking "-" in front of each sub Cursor.
Is this by design, is it a bug, or I don't know yet how to do it? I would need this too inside cursors (sub levels).

If you paste below code and use right mouse button and select "Fold All":

Select
E.EmpNo EmployeeNr,
( -- EmployeeJob
Case
When E.Job = 'CLERK'
Then 'Clerk'
Else
E.Job
End
) EmployeeJob,
( -- EmployeeName
InitCap(E.EName)
) EmployeeName,
E.DeptNo EmployeeDept
From
SCOTT.EMP E
;

-- Cursor Employees
-- How to collapse only code inside cursor like above, but not also cursor itself?
Select
'file1' As "filename",
Cursor(
Select

  Cursor( -- Employees (rec_emp)
    Select
      E.EmpNo   EmployeeNr,
      ( --      EmployeeJob
        Case
          When E.Job = 'CLERK'
            Then 'Clerk'
          Else
            E.Job
        End
      )         EmployeeJob,
      ( --      EmployeeName
        InitCap(E.EName)
      )         EmployeeName,
      E.DeptNo  EmployeeDept
    From
      SCOTT.EMP E
  ) "rec_emp"
  
From
  Dual

) "data"
From
Dual
;

I got this:

Select
E.EmpNo EmployeeNr,
( -- EmployeeJob
( -- EmployeeName
E.DeptNo EmployeeDept
From
SCOTT.EMP E
;

-- Cursor Employees
Select
'file1' As "filename",
Cursor(
From
Dual
;

But I would need this (or at least when I click "+" in front Cursor and then Cursor( -- Employees (rec_emp)):

-- Cursor Employees
Select
'file1' As "filename",
Cursor(
Select

  Cursor( -- Employees (rec_emp)
    Select
      E.EmpNo   EmployeeNr,
      ( --      EmployeeJob  
      ( --      EmployeeName
      E.DeptNo  EmployeeDept
    From
      SCOTT.EMP E
  ) "rec_emp"

From
Dual
;

Regards,
Blacksmith

I can't format this post like I would like to. Text appear as Bold even isn't.

This is as designed; however, the editing component does allow it to collapse all folding regions, at any level, when Fold All is used if we set a different flag when invoking the command. By default it only collapses top-level folding regions. I assume this default behavior is for efficiency.

Toad does not use this additional flag, but it can easily be added for 17.1. The end result would be Fold All will continue to work (visually) as it does now... your cursor will be collapsed, but clicking the + should expand the cursor and leave its nested folding regions collapsed. I will log this and have a look at it this morning.

I just tried it out and it didn't work. Toad uses Scintilla for its editing component. The new flag was added in Scintilla 5.3.0 and Toad is using 5.2.4. I will log this. We are nearing the end of the 17.1 release cycle so it's too late to upgrade Scintilla at this time. I'll look at it for the release that follows 17.1.

Thanks Michael. I will pay attention for this then in 17.2 when will be out.