From bc798dfd8cea9a5f93461e05dcb8409b6d96afc0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 16 Oct 2022 08:01:44 +0800 Subject: vim-patch:9.0.0765: with a Visual block a put command column may go negative (#20676) Problem: With a Visual block a put command column may go negative. Solution: Check that the column does not become negative. https://github.com/vim/vim/commit/36343ae0fb7247e060abfd35fb8e4337b33abb4b --- src/nvim/testdir/test_visual.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 65665d36c0..7fb34ec81f 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -474,6 +474,18 @@ func Test_visual_block_put() bw! endfunc +func Test_visual_block_put_invalid() + enew! + behave mswin + norm yy + norm v)Ps/^/ + " this was causing the column to become negative + silent norm ggv)P + + bwipe! + behave xterm +endfunc + " Visual modes (v V CTRL-V) followed by an operator; count; repeating func Test_visual_mode_op() new -- cgit