When doing a blockwise paste beyond the end of the buffer, changed_lines() is called with an incorrect lnume argument. The third argument curwin->w_cursor.lnum includes the newly appended lines, but lnume should be "the first line below the changed lines BEFORE the change."
This fix subtracts nr_lines (the number of appended lines) from curwin->w_cursor.lnum, as suggested by @brammool in #6660.
Port of neovim/neovim#12733. Fixes #6660.
src/register.c: Fix the third argument to changed_lines() in blockwise paste from curwin->w_cursor.lnum to curwin->w_cursor.lnum - nr_linessrc/testdir/test_listener.vim: Add Test_listener_blockwise_paste() to verify the listener receives correct start, end, and added values when doing a blockwise paste that appends lines beyond the buffer endΒ Β https://github.com/vim/vim/pull/19844
(2Β files)
β
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
β
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
β
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra, why thanks and then close it?
β
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Because I merged it
β
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
How strange, usually when PR is merged, it turns out to be merged. π€
β
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
However thank you π
β
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()