From 446c353a507834a3cbe9007b06e7e0c2c46b5ac7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 4 Mar 2023 08:39:54 +0800 Subject: vim-patch:9.0.1376: accessing invalid memory with put in Visual block mode (#22505) Problem: Accessing invalid memory with put in Visual block mode. Solution: Adjust the cursor column if needed. https://github.com/vim/vim/commit/1c73b65229c25e3c1fd8824ba958f7cc4d604f9c Co-authored-by: Bram Moolenaar --- src/nvim/testdir/test_put.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_put.vim b/src/nvim/testdir/test_put.vim index 97af3699a8..25fc5a2f04 100644 --- a/src/nvim/testdir/test_put.vim +++ b/src/nvim/testdir/test_put.vim @@ -235,5 +235,16 @@ func Test_put_visual_mode() set selection& endfunc +func Test_put_visual_block_mode() + enew + exe "norm 0R\\V" + sil exe "norm \c \" + set ve=all + sil norm vz=p + + bwipe! + set ve= +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit