updated for version 7.0-225
diff --git a/src/misc2.c b/src/misc2.c
index 14c4784..cdff6ab 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -516,7 +516,14 @@
 		|| virtual_active())
 	    curwin->w_cursor.col = len;
 	else
+	{
 	    curwin->w_cursor.col = len - 1;
+#ifdef FEAT_MBYTE
+	    /* prevent cursor from moving on the trail byte */
+	    if (has_mbyte)
+		mb_adjust_cursor();
+#endif
+	}
     }
 
 #ifdef FEAT_VIRTUALEDIT