Paul Jolly wrote:
> Hopefully the attached very rough sequence diagram helps to add a bit
> of colour
>
> Note the attempt to apply the second edit (a line delete) fails
> because Vim has locked the buffer at this point. (I have omitted the
> return from the BufWritePre because of this error, i.e. everything
> unwinds).
>
> I don't think Vim should be calling the callback multiple times for
> the same change, but I might have misunderstood something in the
> listener_add changes.
It looks like the main problem is that a listener callback is invoked
when a previous one hasn't finished yet. Then probably the list of
changes is messed up.
How can that happen? The text is locked, thus there can't actually be a
text change that triggers the callback. Can you figure out what
triggers the second callback invocation?
--
Everybody lies, but it doesn't matter since nobody listens.
-- Lieberman's Law
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201905282133.x4SLX5cA022277%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.