Write buffer when 'update_on_bufenter' is enabled

References #28.