shalimski / swapdiff

swapdiff Extension for Visual Studio Code
MIT License
10 stars 1 forks source link

need to swap color highlights along with swapping files #93

Open imfx77 opened 10 months ago

imfx77 commented 10 months ago

VSCode assumes the paradigm that the first file (left panel) is the "older" one in the comparison and the second file (right panel) is the "newer" one - hence marking with color highlights red for "removed" code and green for "added" code. This paradigm applies both when you manually select 2 files to compare (in specific order first+second) and when you show CVS changes where the first file is read-only instance from a remote repository and the second file is your local copy. So to speak, the red<->green highlights resemble the direction in which the changes are applied.

My long time dev experience made a habit and mindset of mine to expect seeing my pending changes on the left panel and checking them against the right file panel which is the read-only base from the repo. The other way around is really confusing and inconvenient for me. So I really appreciate having the option to swap views, which VSCode should absolutely provide itself !!!

But while swapping both files works fine along with their read-only attribute, it keeps the red highlight on the left and the green on the right. And swapping the files without swapping their color highlights actually leads to even more confusion (as it breaks the perception of the direction of changes) than it takes to flip my mind and wrap it around the assumption that the views are always ordered "(left) old file<->new file (right)"

So pls, consider swapping the color highlights as well (if possible at all?). Keep up the good work! Salute