winmerge
winmerge copied to clipboard
UX issue when long lines have multiple differences
WinMerge v2.16.33.0 has a UX issue that I have experienced several times.
The issue appears when the setting to view differences within lines is enabled.
When comparing 2 text files, I find the typical procedure to be to use the Next Difference toolbar button (or its keyboard shortcut) to scroll through all the differences to view them.
If a line in either file has more than one difference with the other file, and that line is too long to fit in the screen (common in JSON files, for example), the user will never see the difference when clicking on the Next Difference toolbar button (or its keyboard shortcut). This can lead the user to draw incorrect conclusions as to the data being presented by WinMerge.
Even when multiple differences are displayed on the same screen, if there is a large number of characters between them, it appears that WinMerge is making an error and is mistakenly skipping over some differences.
The workaround is to only use the Difference in the Current Line toolbar button. But this has 3 detractions, as compared to the Next Difference button:
- The icon for the
Difference in the Current Linetoolbar button does not clearly indicate its purpose, unlike theNext Differencetoolbar button. - There does not appear to be any keyboard shortcut for the
Difference in the Current Linetoolbar button (at the least, none is presented in its tooltip). - Unlike the
Next Differencetoolbar button's companionPrevious Differencetoolbar button, there is noPrevious Difference in the Current Linetoolbar button.
One possible solution is to simplify the toolbar and remove its Difference in the Current Line button. Once removed, the Next Difference toolbar button (and its keyboard shortcut) would be be assigned to perform the behaviour of the current Difference in the Current Line toolbar button. Similarly, the Previous Difference toolbar button (and its keyboard shortcut) would perform the same action in the other direction.
The problem with this possible solution is when a file has many small changes within a single line. The user would then need to press the Next Difference toolbar button (or its keyboard shortcut) numerous times to get through the line. A possible resolution could be to add a Skip to Next Line button.
I have spent only a small amount of time thinking about possible solutions, so I welcome all to build on the ideas I have presented, or to present completely new ones.
"Difference in the Current Line" is assigned to the F4 key. Also, press Shift+F4 to move to the previous inline difference.
I also think it would be effective to check "Automatically scroll to first inline difference" in the General category of the Options window.
I added "(F4)" to the description of the toolbar icon "Difference in the Current Line" in commit 55ebe92.
"Difference in the Current Line" is assigned to the F4 key. Also, press Shift+F4 to move to the previous inline difference.
I did not know that. Thank you.
I also think it would be effective to check "Automatically scroll to first inline difference" in the General category of the Options window.
Yes, I have that checked.
I do think the issue is significantly larger than just having a keyboard shortcut for Difference in the Current Line.