patch 8.2.5016: access before start of text with a put command
Problem: Access before start of text with a put command.
Solution: Check the length is more than zero.
diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim
index 0fde026..aa5aa2b 100644
--- a/src/testdir/test_put.vim
+++ b/src/testdir/test_put.vim
@@ -210,5 +210,14 @@
bwipe!
endfunc
+" this was putting a mark before the start of a line
+func Test_put_empty_register()
+ new
+ norm yy
+ norm [Pi00ggv)s0
+ sil! norm [P
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab