Thanks very much for taking the time to investigate, debug and fix this.

On Wed, 17 Jul 2019 at 21:56, Bram Moolenaar <[email protected]> wrote:
>
>
> Patch 8.1.1711
> Problem:    Listener callback called at the wrong moment
> Solution:   Invoke listeners before calling ml_delete_int(). (closes #4657)
> Files:      src/memline.c
>
>
> *** ../vim-8.1.1710/src/memline.c       2019-07-15 23:02:10.039954907 +0200
> --- src/memline.c       2019-07-17 22:53:59.739478625 +0200
> ***************
> *** 3566,3571 ****
> --- 3566,3580 ----
>   ml_delete(linenr_T lnum, int message)
>   {
>       ml_flush_line(curbuf);
> +     if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
> +       return FAIL;
> +
> + #ifdef FEAT_EVAL
> +     // When inserting above recorded changes: flush the changes before 
> changing
> +     // the text.
> +     may_invoke_listeners(curbuf, lnum, lnum + 1, -1);
> + #endif
> +
>       return ml_delete_int(curbuf, lnum, message);
>   }
>
> ***************
> *** 3590,3603 ****
>       int               textprop_save_len;
>   #endif
>
> -     if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
> -       return FAIL;
> -
> - #ifdef FEAT_EVAL
> -     // When inserting above recorded changes: flush the changes before 
> changing
> -     // the text.
> -     may_invoke_listeners(buf, lnum, lnum + 1, -1);
> - #endif
>       if (lowest_marked && lowest_marked > lnum)
>         lowest_marked--;
>
> --- 3599,3604 ----
> *** ../vim-8.1.1710/src/version.c       2019-07-17 22:00:15.591219445 +0200
> --- src/version.c       2019-07-17 22:55:17.355101243 +0200
> ***************
> *** 779,780 ****
> --- 779,782 ----
>   {   /* Add new patch number below this line */
> + /**/
> +     1711,
>   /**/
>
> --
> Kisses may last for as much as, but no more than, five minutes.
>                 [real standing law in Iowa, United States of America]
>
>  /// 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/201907172055.x6HKtsMg002351%40masaka.moolenaar.net.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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/CACoUkn5e1e_Lvgc5WqRVuR-JHpv44YVacAWqp__3zgiKLFkNNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui