From b2b288f33c7a8e780654d5f883dfc2948ff7edc3 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 26 Jan 2022 16:37:25 +0100 Subject: vim-patch:8.2.4215: illegal memory access when copying lines in Visual mode Problem: Illegal memory access when copying lines in Visual mode. Solution: Adjust the Visual position after copying lines. https://github.com/vim/vim/commit/dc5490e2cbc8c16022a23b449b48c1bd0083f366 --- src/nvim/testdir/test_visual.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index e1e7765e06..5fb4934a1d 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1151,5 +1151,16 @@ func Test_visual_reselect_with_count() call delete('XvisualReselect') endfunc +" this was leaving the end of the Visual area beyond the end of a line +func Test_visual_ex_copy_line() + new + call setline(1, ["aaa", "bbbbbbbbbxbb"]) + /x + exe "normal ggvjfxO" + t0 + normal gNU + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit