patch 9.0.0011: reading beyond the end of the line with put command
Problem: Reading beyond the end of the line with put command.
Solution: Adjust the end mark position.
diff --git a/src/register.c b/src/register.c
index 93860ba..30e2001 100644
--- a/src/register.c
+++ b/src/register.c
@@ -1918,6 +1918,8 @@
vim_memset(ptr, ' ', (size_t)spaces);
ptr += spaces;
}
+ else
+ totlen -= spaces; // didn't use these spaces
}
// may insert some spaces after the new text
diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim
index aa5aa2b..66438bd 100644
--- a/src/testdir/test_put.vim
+++ b/src/testdir/test_put.vim
Binary files differ
diff --git a/src/version.c b/src/version.c
index c2726aa..11fd817 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 11,
+/**/
10,
/**/
9,