It appears that if you have a perl write-hook, then the buffer's modified state
does not get updated correctly.
With a simple perl hook like:
store-procedure a_write_hook
perl "1;"
~endm
setv $write-hook a_write_hook
If you edit three files, modify them all, display the buffer list (*) to verify
they are all marked modified. and then write them all out (:ww)
the files get written out, the hooks get executed, but the buffers remain
marked modified.
If the write hook does not use perl, then it works fine.
It appears to be caused by vile's perl code's manipulation of curbp.
The problem can be avoided with this simple patch (attached)