[4.50] IDE Find does not find everything...

Post bugs related to the IDE here
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

[4.50] IDE Find does not find everything...

Post by Michael Vogel »

When I did a search for "whole words only", the IDE didn't jump to all occurencies of "OptReportGSize" in the following code:

Code: Select all

OptReportGSize=1
y=OptReportG*OptReportGSize
Debug OptReportGSize
Seems to be a bug, isn't it?
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [4.50] IDE Find does not find everything...

Post by Little John »

I stumbled across the same issue some time ago, and almost forgot about it.
In your code above, OptReportGSize is not found in the 2nd line. In the code below I added another line, where it isn't found either.

Code: Select all

OptReportGSize=1
y=OptReportG*OptReportGSize
Debug OptReportGSize
Debug @OptReportGSize
In my opinion, it's a bug.

Regards, Little John
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: [4.50] IDE Find does not find everything...

Post by Arctic Fox »

When double-clicking the word in order to select it, it selects 'OptReportG*OptReportGSize' and '@OptReportGSize' respectively instead of just OptReportGSize.
(in other words, it seems that those ones are the whole words according to the IDE)

Whether it is a bug in the Find-function or IDE - if it is a bug at all - is not up to me to decide :mrgreen: :wink:
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [4.50] IDE Find does not find everything...

Post by Little John »

This is the problem from my point of view:

Imagine we have the following code

Code: Select all

Abc = 1
y = 3*Abc
Debug y
Debug @Abc

myAbc = 1
y = 3*myAbc
Debug y
Debug @myAbc
and then we want to rename variable Abc to Xyz, but we do not want to rename variable myAbc to myXyz.
I.e. when replacing Abc with Xyz, we have to chose the option
[v] whole words only.

After doing the Search/Replace in the IDE, the code looks like this:

Code: Select all

Xyz = 1
y = 3*Abc
Debug y
Debug @Abc

myAbc = 1
y = 3*myAbc
Debug y
Debug @myAbc
The second part (concerning variable myAbc) remained unchanged as intended and expected. OK.

But in the first part, in two cases (line 2 and line 4) Abc has not been replaced with Xyz. So the code works differently than it did before renaming the variable. This should not happen IMHO. To me it is obvious, that in such a situation the user wants to rename all occurrences of Abc, i.e. also those in the second line and in the fourth line.

Regards, Little John
Post Reply