Discussions related to Visual Prolog
Harrison Pratt
VIP Member
Posts: 335
Joined: 5 Nov 2000 0:01

Find in Files (Replace All) is mangling text

Unread post by Harrison Pratt »

Find in Files/Replace All seems to be having a problem with overwriting '(' and adjacent characters in the target text.

If use, for example, the parameters below:
Find in Files dialog.jpg
Find in Files dialog.jpg (26.92 KiB) Viewed 1923 times

The IDE changes the line below

activityCombined_Updater::updateCombinedActivity(activityCombined_Updater::updateModeRecent),

to this line:

activityCombined_Updater::updateCombActivityUBSactivityCombined_Updater::updateModeRecent),

It seems to be specific to certain files in one project.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1194
Joined: 28 Feb 2000 0:01

Re: Find in Files (Replace All) is mangling text

Unread post by Thomas Linder Puls »

I believe the problem is caused by TAB characters in the affected files.

Our IDE never insert TAB characters, so either they have been in the file from ancient time, or they have been put in by some "foreign" editor.

If you (auto-)format the file there will be no TAB characters. The formater program vipPP.exe can run on an entire directory structure (it will produce a parallel directory structure with the formatted files, so it is safe to try it out).
Regards Thomas Linder Puls
PDC
Harrison Pratt
VIP Member
Posts: 335
Joined: 5 Nov 2000 0:01

Re: Find in Files (Replace All) is mangling text

Unread post by Harrison Pratt »

Ahhh ... auto-format doesn't trigger on changes made by an external editor (Notepad++). I needed to change the Tab Replace by space setting in NPP so I don't need to remember to run the little macro I created to to that before closing the file.

Thanks!
Screenshot 2020-09-10 111434.jpg
Screenshot 2020-09-10 111434.jpg (91.01 KiB) Viewed 1885 times
Post Reply