When using ediff, I find it annoying that when I use a
or b
to copy from one buffer to another, the region remains highlighted despite the fact that the two files now match in those regions. I don't know if I'm the only one who expects the highlighting to always reflect the actual differences between the files or what.
I can use !
to call ediff-update-diffs
after each such call, but that doesn't seem like the right solution because it updates the diff of the entire buffer, not just the region that was just pasted. I thought about
- remapping a and b to lambdas that call
ediff-copy-B-to-A
and thenediff-update-diffs
. One problem with that is that if I make some edits by hand, the highlighting will not be updated. Still the best thing I have thought of, though. - Calling
ediff-update-diffs
from a hook that runs any time the buffer is changed, but it seems like that would call it after every keystroke.
What's the best practice that ensures the highlighting in ediff always reflects the actual differences between the files, while retaining performance?
ediff-auto-refine
to'on
the vanishing of all fine changes indicates the equal regions. If the diff region is removed all following diff indexes must be corrected. So,ediff-update-diffs
is maybe the best shoot.