Toad World® Forums

Replace All Bug (6.3.0.1796)


#1

Two related issues that look buggish from this side:

Test case:
Copy the below code into the code editor and select the first 2 lines of code:

SELECT a.col1, a.col2, a.col3
FROM tabletest a
WHERE a.col4 IS NULL

Bring up the Replace dialog (ctrl+h), enter ‘a.’ as the text to find and ‘r.’ as the text to replace. Select a scope of ‘Selected text’ and an origin of ‘From top/bottom’. Click [Replace All]. this step does fine BUT, it un-selects the block of code.

Now, repeat the replace all with the same conditions except change the text to find to be ‘col’ and the text to replace to ‘row’. This time when you hit [Replace All], it replaces all instances in the code, not just in the block that had been selected.

Bug1: Replace All should not un-select the selected block. Replace does not unselect the block, only Replace All does
Bug2: If the scope is selected as ‘Selected Text’ and no text happens to be selected then Replace All should not replace anything. It definitely (in my opinion) should not replace all globally. Alternatively, you can disable the selected text option if no text is selected.


#2

Bug1 :Nice find: if the “simple replace” maintains the selected text, replace all should also do the same

I would also ask for an ER: If you have more than one line of selected text when opening the replace window the default scope should be selected text (like it occurs with the find window)

Regards
Filipe


#3

Hi Mark and Filipe,

We will raise a CR for this, but I think it will be fixed after 6.3

Regards,
Roman