Toad World® Forums

Replace All collapses all regions


Is there a reason that when you do a Replace All in the Find/Replace dialog box
that all regions are automatically collapsed?

(I supposed that’s better than all regions being automatically expanded,
but still it would be nice if at least the region where my cursor or selection
was at the time stayed expanded.)



Hello, Darren!

Sorry for the delay response.
CR93650 was created.

Thank you.

Kind regards,
Julia Ponomareva.


I’m having this problem with Toad for Oracle 11.5, too. Is there a fix yet?


this is Toad for SQL Server community, not Toad for Oracle. And actually they are two different products so I have no idea about fix in Toad for Oracle.

BTW, we were not able to address this on TSS 5.7 release, so it will be available in next release only.



It looks like CR93650 when fixed did exactly what I mentioned would be worse – it now EXPANDS all regions. In Toad 6.6 replace now expands all regions – whether you are replacing in a selection or the entire document.

I can understand expanding all regions if you were doing a search and replace WITHOUT a selection. But when you have a specific selection made I would expect ONLY THE SELECTION made to be expanded – not every region on the entire document which is what is happening.

Again, The real fix for this is to add code that makes note of which regions are expanded and collapsed, perform the search and replace, and then return the regions to their prior state!

In addition, the system should note which line number the cursor is currently on / or what selection is currently made, and should restore the cursor position and/or selection.

The other issue introduced is that Toad now appears to hang after performing the search and replace. I have a 219 line script and performing a search and replace on a 3 line selection in that larger script is taking minutes to perform instead of seconds. It eventually completes, after expanding all regions, but when set to only replace in selection should have taken a fraction of a second and not messed with the regions.


Hi Darren,

I create a TSS-772 for this issue. Sorry for your inconvenience.

Best Regards,



Some additional feedback on this, if you don’t have time for a sophisticated fix, a simple fix of making note of the line number that has the focus (or the first line of a selection) at the time the operation is performed, and then going back to that line automatically would at least be helpful. Currently that’s the work around I use when I remember – make note of the line #, perform operation, press CTRL+G then key the line number I made note of previously and click OK.