Closed tummetott closed 1 year ago
This is indeed a limitation of how the diff-mode works in (n)vim. You can compare any 2-8 buffers, but every buffer in diff-mode will be compared against every other buffer in diff-mode. You can't selectively choose what buffers are compared against what other buffers unfortunately. You'll have to take this issue upstream.
Damn ok I'll try to take that issue upstream. Thank you
@tummetott, Could you share the link to the upstream issue?
Hey sindrets,
I might have a general question considering the diff capabilities of (neo)vim. When inside a 3 way diff (resolve a merge conflict), is it possible that the
ours
file is only diffed against thelocal
file, thetheirs
file is also only diffed against thelocal
file and thelocal
file is diffed against bothours
andtheirs
? Right now it seems that all files are diffed against each other.What bothers me is the following scenario: The
local
file shows git conflict markers when openingdiffview
on a file with merge conflicts. I jump to the first conflict and decide to keep the changes of e.g.ours
by pressing2do
.ours
andlocal
are now in sync considering the 1st conflict. However, the respective codelines inours
are still highlighted (with theDiffChanged
andDiffText
orDiffAdd
hl-groups), becauseours
still differ fromtheirs
considering the 1st conflict. In a 3-way diff, I would expect identical codeblocks inours
andlocal
not to be highlighted inours
, independend of the state oftheirs
. (Respectively, I'd expect that identical codeblocks inlocal
andtheirs
are not highlighted intheirs
, independend of the stateours
) Conflicts inours
andtheirs
will never be resolved in the very same files. Both files are not modifiable. You basically resolve the conflicts inlocal
. Thats why it makes sense for me that they both only diff againstlocal
, whilelocal
diff against both.Is this something I could configure (which hooks or some other magic), or am I asking the impossible?