Page 1 of 1

Improvement to Compare tool

Posted: 2024-12-22, 17:24 UTC
by AntonyD
The comparison tool has the ability to manually compare (reduce to one level) different lines in files. When, for example,
we can the 4th line in the left file forcefully level out and start comparing it with the 6th line in the right file.
And this opportunity is very useful. BUT! There is one very big minus. I'm not allowed to select any gray/empty space.
And this is not clear. After all, sometimes for better clarification in compared texts it is only necessary to visually
push apart a certain sequence of lines and on the opposite side simply “figuratively squeeze” others into this void
lines. And in fact, no comparison can be made.

https://i.ibb.co/VTvD8Cp/example.png

In this picture, it is clearly visible: I need to align the 8th line on the right side with the first empty/gray line on the left side
(temporarily highlighted by the cursor placed in this line). And as we can see, there isn't even a line number for this area on the left.
And that is correct. But I just need to bring the 8th line on the right exactly to this empty line. And right now, I am not allowed to do that.
I would like to achieve the desired outcome...

Re: Improvement to Compare tool

Posted: 2024-12-23, 09:07 UTC
by ghisler(Author)
This isn't how "Resync comparison from here" works: It can only compare existing lines. Lines without line numbers do not exist in any file, they are just there to realign the two files for matching lines.

Re: Improvement to Compare tool

Posted: 2024-12-23, 13:11 UTC
by AntonyD
That is why I am asking for such an opportunity - because it does not exist yet.
I'm not saying that we need to compare these lines - I need to RE-align them to different levels.

Re: Improvement to Compare tool

Posted: 2024-12-24, 09:02 UTC
by ghisler(Author)
But it wouldn't work even if the user could select that non-existing line! Why? "Resync comparison from here" just tells TC to re-start comparison from the two selected lines. This means that it would look for matching lines from this point forward. But non-existing lines can never match any real lines in the other panel! TC would just look for the next pair of matching lines below that point and put them on the same level in the compare tool.

Re: Improvement to Compare tool

Posted: 2024-12-24, 10:26 UTC
by browny
While on the subject of resync: When editing, why it is not sufficient to resync from cursor positions in panes instead of making random selections?

Re: Improvement to Compare tool

Posted: 2024-12-24, 10:39 UTC
by ghisler(Author)
Because you can't see the cursor in the inactive pane, so you could accidentally resync the wrong lines.

Re: Improvement to Compare tool

Posted: 2024-12-24, 18:22 UTC
by browny
ghisler(Author) wrote: 2024-12-24, 10:39 UTC Because you can't see the cursor in the inactive pane, so you could accidentally resync the wrong lines.
It is not very obvious how to select an empty line, but if it was made:
- nothing would be seen in the inactive pane;
- the cursor would be on the wrong line in the active pane.

It makes sense to highlight somehow the line (or line number) and avoid such unnecessary selections.

P.S. Sorry for a bit of hijacking the topic.

Re: Improvement to Compare tool

Posted: 2024-12-24, 18:39 UTC
by AntonyD
All current explanations simply boil down to the fact that it doesn’t work that way NOW.
I already understood this - I ask you to consider the situation - HOW you can change the code so that
IN ADDITION to the comparison operation, it was also possible to perform a simple alignment operation!
IN a future!

nearest future of course))))