2

The DiffUpdated event has been added in patch-8.1.0397. Sometimes the event occurs a few times in a session. For example, when 2 files are opened in diff mode, ":e!" generates the event 3 times. As another example, "dd" will generate it 2 times. Also 2 times for ":.diffget".

It is much better to catch and act only on the last event rather than each time the event occurs. Is there any idea to identify the last one?

We can see it by using something like this.

let g:evhist = []
autocmd DiffUpdated * let g:evhist += [mode()]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.