Using “Replace All” when searching, replaces exactly half and not all

Bug 1: When working on a project I wanted to change the name of a variable I had used a lot. When I searched and used “Replace All” only half of the variables names had changed.

I opened up the “Roller Coaster” example project to double check the error, and I noticed the issue occurred there as well. If you would like to recreate the bug, open the “Roller Coaster” project and select the “ColourNames” tab. Search for “Colour” and replace with “Color”. Only half will be replaced. If you keep pressing replace all, each time the next half will be replaced. So “All” can be replace if you keep pressing the “Replace All” button.

Bug 2: Also, after testing in the ColourNames tab, I noticed that if the word being replaced is at the beginning of a line, a new line is inserted.

Take your time fixing the issues, I just want to make sure you know about them. Have a nice night! (or morning!)

@exomut That error was already posted, but I don’t remember when. It’s good that you posted it again.

@exomut I just fixed this bug for the next version. Tried doing the replace on the Roller Coaster example and it appears to work correctly now.

It seems like I introduced it recently when fixing a completely different bug. (This is what happens when I modify code from 2012.)

/me clears throat :slight_smile:

@RonJeffries I have better practices now :stuck_out_tongue: but I can’t fix the past all at once