WinMerge / winmerge

WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.
https://winmerge.org/
GNU General Public License v2.0
6.15k stars 784 forks source link

"Copy to right" doesn't work under special circumstances (left nothing, right additonal emtpy line) #2204

Open rondlh opened 5 months ago

rondlh commented 5 months ago

In the image below, the right file has an additional empty line, which I want to mirror to the right (delete the extra line), but the "copy to right function" doesn't do that, nothing seems to happen when I click "Copy to right".

Copy To Right

I have "Ignore blank lines" enabled, perhaps this is the cause.

sdottaka commented 5 months ago

Enabling "Ignore blank lines" will ignore differences in blank lines and make the background a light yellow color. As you might have guessed, the ignored differences are not eligible for copying. Disable "Ignore blank lines" to copy the differences.

rondlh commented 5 months ago

This behavior is a bit odd in my view, WinMerge shows me there is a difference, and give me the option to copy it, but just ignores me when I select it. In my view it would be better to:

  1. not show the difference OR
  2. copy the difference if I use the copy option. Showing me a difference, but not letting me copy seems not logical. I do not like to toggle "Ignore blank lines" the whole time just to copy these blank lines.

UPDATE: Even more illogical is that if there is a blank line on the left, but nothing on the right, then "Copy to the right" works fine (with "Ignore blank lines" enabled).