Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-03

Bug in find-in-files and replace :(

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

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 :/

Michael.

Reply by email