Ignore line breaks

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Ignore line breaks

Post by mshumway »

Hi, the only topic I found searching about this was about 10 years old so perhaps something has changed since then...

I am comparing HTML files, but they often contain sections of text that render as paragraphs on the page. Our code beautifier adds hard line breaks after 120 characters, which yeah isn't great, we are working on that :)

The problem is, when we make textual changes, the hard breaks are changed. So for example we go from this:

This text is on line 1,
and this is on line 2,
and this is on line 3.

to this:

This text is on line 1,
and this is now
on line 2, and this is on line 3.

What I want is for that to only highlight one difference, the addition of the word 'now'. Is there a way to have that happen? At the very least, the word 'now' should be highlighted with a different color than the rest of the text that changed, but its not, and therefore difficult to spot. Thanks for any help.
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

What I want is for that to only highlight one difference, the addition of the word 'now'. Is there a way to have that happen?
No, there's no way for this to happen.
At the very least, the word 'now' should be highlighted with a different color than the rest of the text that changed, but its not, and therefore difficult to spot.
Please attach a screenshot of your results.
psguru
PrestoSoft
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

Unfortunately I cannot figure out how to attach an image. I found where I could link to an image, but I don't know where I could store an image to link to.

But, whether I add some text or remove some text to this paragraph I am playing around with, all the lines that were affected are colored yellow on both sides, then the words that were affected are colored blue on the left and red/maroonish on the right. The text that was removed or added is also highlighted on the side that it exists, but with the same color as the words that were moved to a new line, making it difficult to notice that they are new (or have been removed), and not just moved around.
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

See https://www.phpbb.com/community/viewtopic.php?t=2499861 on how to attach an image to a post.
psguru
PrestoSoft
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

.. and not to hijack my own thread, but one more question if I may:

Is there a way to make it so that the down and up arrows that move to the various changes, move you relative to your current cursor position in the code? So if I click in the view window, and am scrolling around, and I click in an area where there are no changes, I would like the down arrow to move to the next change after the cursor position, rather than whatever is next in the Diff dropdown list at the top.

We often need to scroll around to make sure we are in the correct spot in the code, but then quickly go back to the change we were looking at. The way it works now is we sometimes have to click up then down again to get back to where we were, making it easier to lose our place.
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

Ahh ok found it thanks. Here is a screenshot then of what I mean. You can see the text I removed is highlighted the same as all the other text (on the left side) that got moved.
Screenshot 2021-06-24 095936.png
Screenshot 2021-06-24 095936.png (26.66 KiB) Viewed 5119 times
And I realize in this particular example it is somewhat simple to see what happened. But, its not always that clear. And if you didnt know what edit was made, it would take a few moments to read through the text to see anyway.
Last edited by mshumway on Thu Jun 24, 2021 8:02 am, edited 1 time in total.
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

The current diff marker follows your cursor position. You can click in a text pane, then scroll text normally. To go to the next diff block from there you can use the Next Diff command, of Shift-Mouse Wheel scroll.
psguru
PrestoSoft
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

Your screenshot looks normal to me.
psguru
PrestoSoft
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

So, I have two changes. If I am viewing the second change, and I click above it in the window, then scroll up a bit, the down arrow should move me back to that change. Currently, its not even available to click in that situation. It is greyed out. I have to click the up arrow, moving me back to the first change, then the down arrow is active again and I can click it to move back to the second change.
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

And regarding the screenshot, what I would hope is that the text that got deleted "'loan or a Loan Guaranty", be highlighted with a different color, indicating a deletion as opposed to simply having been moved to a new line. But it does sound like that is not possible.
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

So, I have two changes. If I am viewing the second change, and I click above it in the window, then scroll up a bit, the down arrow should move me back to that change. Currently, its not even available to click in that situation. It is greyed out. I have to click the up arrow, moving me back to the first change, then the down arrow is active again and I can click it to move back to the second change.
As I said, the current diff marker follows your cursor position. If it's closer to the first change, the latter becomes the current diff.
psguru
PrestoSoft
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

text that got deleted "'loan or a Loan Guaranty", be highlighted with a different color, indicating a deletion as opposed to simply having been moved to a new line.
It is marked as deleted, as far as I can see. You only have two types of inline changes in your sample: deletions (on the left) and additions (on the right).
psguru
PrestoSoft
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

psguru wrote: Thu Jun 24, 2021 8:21 am It is marked as deleted, as far as I can see. You only have two types of inline changes in your sample: deletions (on the left) and additions (on the right).
Well, yes, but I would like it to differentiate between text that got moved to a new line, versus text that isn't there anymore. It sees those two types of changes as the same, which makes sense, I just don't like it. :D

Our current diff program DOES do that, so I know it's possible, it's just that our current diff program also doesn't have word wrap, which is what we are wanting.
psguru wrote: Thu Jun 24, 2021 8:19 am As I said, the current diff marker follows your cursor position. If it's closer to the first change, the latter becomes the current diff.
Right, and I dont want that either. I want it to always move to the next change relative to the cursor position, not relative to any other change. Sounds like that is not possible either though.

In any case, I appreciate your help!
User avatar
psguru
Site Admin
Posts: 2122
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Ignore line breaks

Post by psguru »

I want it to always move to the next change relative to the cursor position
... and it already does this. Whatever the closest diff block is to the cursor position, EDP will make it the current diff.
psguru
PrestoSoft
mshumway
Junior Member
Posts: 11
Joined: Wed Jun 23, 2021 11:09 am

Re: Ignore line breaks

Post by mshumway »

psguru wrote: Thu Jun 24, 2021 9:07 am ... and it already does this. Whatever the closest diff block is to the cursor position, EDP will make it the current diff.
Ok so I just realized that, while the arrows wont go back to it in this situation, you can click the square yellow button in the middle to get back to the current one. I think that may mostly solve the issue I was having.
Last edited by mshumway on Thu Jun 24, 2021 9:33 am, edited 3 times in total.
Post Reply