[Lazarus] Bug in find-in-files and replace :(

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Lazarus] Bug in find-in-files and replace :(

Michael Van Canneyt


I have a bug in Find in files:

Search Excercise and replace with Exercise

  If you have
   TSomeExcercise = Class(TExcercise)

Then you'll end up with
   TSomeExercise = Class(Exercisee)

i.e. the second occurrence is replaced, but the placement is offset by 1
character, presumably because the replace term is one character shorter as
the search term. this is corroborated by the fact that

   (TMyExcercise, TRunMyExcercise, TMyExcerciseHistory)

is replaced by

   (TMyExercise, TRunMExercisee, TExerciseseHistory)

i.e. the third occurrence is replaced, 2 characters offset.

I spent 1 hour correcting the result of this bug in a project of mine,
because I didn't trust 'Undo' to make things worse.

Reported as Bug 19001. Hopefully this one is not in the 0.9.30 release
because it can seriously mess up your files :/


Lazarus mailing list
[hidden email]