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.05k stars 773 forks source link

Replace - more intelligent choice of replace in (whole file vs selection) #2368

Closed meteorquake closed 2 days ago

meteorquake commented 2 days ago

Typically I'll double-click a word or small phrase and Ctrl-H to replace it to something else (this sequence prepopulates the replacer). This is common if for example the old and new are code that has a variable name change that is causing a lot of differencing highlights and I quickly want to remove that to see the other differences. In doing so, because the Replace was called up from a selection, the replace default is "Selection" rather than "Whole File" which isn't sensible because the selection is only a few characters long.

Cheers, David

sdottaka commented 2 days ago

In commit ba108a9, I modified the behavior so that if a single line or less is selected, "Whole file" will be chosen in the Replace dialog. If multiple lines are selected, "Selection" will be chosen instead. Thank you for your report.

meteorquake commented 2 days ago

Super! Look forward to it. Thanks for the speediness!