patch 8.2.5037: cursor position may be invalid after "0;" range
Problem: Cursor position may be invalid after "0;" range.
Solution: Check the cursor position when it was set by ";" in the range.
diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim
index 16d435b..f55e6a5 100644
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -717,5 +717,13 @@
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