Sometimes Find has "Whole words only" checked automatically

Cannot replicate willfully but quite often I notice that Find window in editor has "Whole words only" checked but I never deliberately use that option. This has been quite dangerous as if goes unnoticed then search does find what is expected and bugs have slipped through.
Is there is some logic how it auto-enables and can it be disabled or maybe it is a bug?

Here's what I see from a glance at the code:

  1. Find and Replace are really the same window
  2. When the Find/Replace window closes, it writes its settings to Toad.ini.
  3. When the Find/Replace window opens, it reads its settings from Toad.ini.
  4. Checking "Regex" will disable and uncheck "Whole words"
  5. ALT+W will check/uncheck "whole words"
  6. If you have multiple editors open, you can have multiple find dialogs open
  7. I don't see any other code that will check/uncheck

With that in mind, here is all I can come up with (And both seem like a bit of a stretch)

Do you ever have multiple find windows open? Or a find and a replace (they are really the same window). In that case, I can see how the 2nd window opens and pulls its settings from Toad.ini, when maybe you are expecting it to open it with the 1st window's settings.

Is it possible that you are doing an Alt+W, maybe intending to open the "Window" menu (off the main menu), or maybe you're just hitting this keystroke while entering the search string or doing something else while this window is open?

Sometimes have multiple Toad-s open but unlikely find/replace open simulataneously. I thought that Alt+W could be the reason but I don't use that key combo intentionally, still sounds like user error is most likely, occasional misclick for example. Should screen record myself for a week :smiley:

Found a case where this anomaly reproducibly appears. Toad beta and non-beta behave identically.

  1. In editor create a trigger, select trigger name (mouse doubleclick TRG_TEST1) and describe (keyboard F4)
  2. In opened source window make sure that nothing is selected (click anywhere) and search (Ctrl+F)
  3. Search window has now "Whole words only" checked and this will be remembered elsewhere.

create table TEST1(i number);

create trigger TRG_TEST1 before delete on TEST1
begin
NULL;
end;

Randomly opened some other object source windows but so far only trigger source triggers this behaviour.

Thank you. I can reproduce that and see why it is happening. I will fix it for next beta.

1 Like