You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some conflicts, the merge editor shows an Accept Combination button. Accepting the combination resolves the current conflict by smartly merging both changes. This is especially useful for changes in the same line that don't touch the same characters.
Would it be feasible to add something like this to this diffview plugin?
The text was updated successfully, but these errors were encountered:
The hard part is reconciling intraline differences made by ours and theirs, and handling all the edge cases (e.g. ignoring whitespace, more than 2 changes total to a line, etc.).
Here's an idea/rough starting-point (just quickly whipped this up on my own so it needs to be cleaned up and it's probably buggy atm):
I love little challenges like this, but the actual algorithm used by vscode may already be public/open source? If so, it'd probably be straightforward and easy to port over to lua/neovim. I also had the idea of utilizing regular diff (e.g. vim.diff) and just splitting the respective lines (e.g. on every character) beforehand, but I'm not sure if/how that'd work if at all (again you'd probably have to handle whitespace and empty lines specially/intelligently).
But I do agree and think this would be a cool feature (which is why I've tried to implement it on my own already).
First off, thank you for this useful plugin.
VScode has a pretty neat feature that allows a same line conflict to be resolved very quickly and efficiently.
From here: https://code.visualstudio.com/docs/sourcecontrol/overview#_resolving-conflicts
Would it be feasible to add something like this to this diffview plugin?
The text was updated successfully, but these errors were encountered: