Bug? one find&replace undoes a previous one

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
BjoernThiele
Posts: 15
Joined: Thu May 05, 2022 12:36 pm

Bug? one find&replace undoes a previous one

Unread post by BjoernThiele »

Hi there,

I try to run find&replace to add non-breaking spaces between numbers and units.
At first that works. In my case " Mpx" gets replaced by "°Mpx" ("°" for non-breaking space)

Then I do the same for the next unit, in my case replacing " fps" by "°fps". That works, too, but now all instances on "°Mpx" are reset to " Mpx". It does not seem to make any difference if I save my project in between or not.

Bug or anything I can do differently to make this work?
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Bug? one find&replace undoes a previous one

Unread post by Tim Green »

Hi Björn,

What you describe here isn't really possible. It would involve multiple undo steps, and you would have to confirm every single one. It would also only be possible within a single topic. My guess is that when you say the "next unit" you are referring to topics, and that you actually have more than one copy of that topic -- i.e. multiple topic files that have identical or very similar content. When you perform your second search and replace you are actually skipping on to the next topic and seeing the versions of your first text there that have not been replaced yet.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
BjoernThiele
Posts: 15
Joined: Thu May 05, 2022 12:36 pm

Re: Bug? one find&replace undoes a previous one

Unread post by BjoernThiele »

Hi Tim,
I just found the time to check this again. This error really does occur, no idea why. I just reproduced it again three times, with and without saving my project in between and even with a restart of the software. (Just this time my units were "Mpx" and " mm".) I checked that I indeed stayed in the same topic file. I also checked whether find and replace worked in other topics, too. Both were the case.
Here's what I do step by step:
1) Hit ctrl+F to open find and replace dialog
2) enter " mm" in "Find What" line
3) enter "[Alt+0160]mm" in "Replace With" line (Alt+0160 for non-breaking space). "Match case" is checked, "Match whole word" is unchecked.
4) click "Replace All"
5) Confirm
6) close find&replace dialog

In the H+M editor window my view has now jumped to top of my current topic. I scroll down to the line I started from and my spaces in front of "mm" are now protected, as intended. This is the case in other topic files with "mm", too.
Everything normal up to here.

7a) save project
7b) don't save project
7c) save project, close and restart H+M
(no difference)

8-13) same as 1-6 above, just this time with "Mpx" instead of "mm"
I am still in the same topic from which I started, again moved to top. Now, spaces in front of "Mpx" are protected. Spaces in front of "mm" are back to normal.
This works both ways. Replacing " Mpx" undoes replacing " mm" and vice versa.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Bug? one find&replace undoes a previous one

Unread post by Tim Green »

Hi Björn,

You didn't mention that you were using the "All Topics" option in "Find In:", but now that I've tested it with that I can reproduce it. This is bizarre and our developers are going to analyze what is happening here right away. I'll get back to you on it as soon as I have more information. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Bug? one find&replace undoes a previous one

Unread post by Tim Green »

Hi Björn,

I could only reproduce it (I think...) once, but now it appears to be impossible again. Actually, this is something that should be entirely impossible. Please send a small demo project with which you can reproduce the issue to support AT ec-software.com (replace the AT with @) and we'll see if we have more luck with that.

If you could record a video of you performing this operation with a program like Camtasia this would also be really helpful. Then we could see better exactly what is going on.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply