From 772ae3e6566a0c9207cfc60e5f02af9cd32685da Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 29 May 2022 07:00:18 +0800 Subject: vim-patch:8.2.5037: cursor position may be invalid after "0;" range (#18782) Problem: Cursor position may be invalid after "0;" range. Solution: Check the cursor position when it was set by ";" in the range. https://github.com/vim/vim/commit/4d97a565ae8be0d4debba04ebd2ac3e75a0c8010 --- src/nvim/testdir/test_excmd.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim index 8055a51a11..7dde8a0439 100644 --- a/src/nvim/testdir/test_excmd.vim +++ b/src/nvim/testdir/test_excmd.vim @@ -422,5 +422,13 @@ func Test_address_line_overflow() bwipe! endfunc +" This was leaving the cursor in line zero +func Test_using_zero_in_range() + new + norm o00 + silent! 0;s/\%') + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit