I have started using vimdiff as my git difftool, and I have accidentally used the command dp (diff put) to put some code to the other file. However, pressing u does not undo that, and vim says at the bottom "Already at oldest change"
Undoing do (diff obtain) command works perfectly, but strangely not with dp !!
Any ideas?
Here is an attempt to explain the issue in a more graphical way.
ais the current buffer:bis the target ofdpso, afterdp, the current buffer is unchanged anduis useless. It is the target that is changed and you can't undo a change in one buffer from another one:bmust become current foruto work:after
u:Now, let's go back to the beginning, with
abeing current:After
do, it is the current buffer that is changed:and the change can be undone with
uwithout having to change windows: