updated for version 7.4.559
Problem:    Appending a block in the middle of a tab does not work correctly
            when virtualedit is set.
Solution:   Decrement spaces and count, don't reset them. (James McCoy)
diff --git a/src/ops.c b/src/ops.c
index edc84a0..0db8c2d 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -612,20 +612,20 @@
 #ifdef FEAT_MBYTE
 	if (has_mbyte && spaces > 0)
 	{
+	    int off;
+
 	    /* Avoid starting halfway a multi-byte character. */
 	    if (b_insert)
 	    {
-		int off = (*mb_head_off)(oldp, oldp + offset + spaces);
-		spaces -= off;
-		count -= off;
+		off = (*mb_head_off)(oldp, oldp + offset + spaces);
 	    }
 	    else
 	    {
-		int off = (*mb_off_next)(oldp, oldp + offset);
+		off = (*mb_off_next)(oldp, oldp + offset);
 		offset += off;
-		spaces = 0;
-		count = 0;
 	    }
+	    spaces -= off;
+	    count -= off;
 	}
 #endif
 
diff --git a/src/testdir/test39.in b/src/testdir/test39.in
index 410dea6..c4e46ff 100644
--- a/src/testdir/test39.in
+++ b/src/testdir/test39.in
Binary files differ
diff --git a/src/testdir/test39.ok b/src/testdir/test39.ok
index d8e9015..5c517e2 100644
--- a/src/testdir/test39.ok
+++ b/src/testdir/test39.ok
Binary files differ
diff --git a/src/version.c b/src/version.c
index 4efee6a..e2ac040 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    559,
+/**/
     558,
 /**/
     557,