changeset 5018:d6a7dea44a86 v7.3.1253

updated for version 7.3.1253 Problem: Still undo problem after using CTRL-R = setline(). (Hirohito Higashi) Solution: Set the ins_need_undo flag.
author Bram Moolenaar <bram@vim.org>
date Thu, 27 Jun 2013 22:21:24 +0200
parents 13ae542e58ba
children 3677dcf753e9
files src/edit.c src/version.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -8134,15 +8134,17 @@ ins_reg()
 # ifdef USE_IM_CONTROL
 	int	im_on = im_get_status();
 # endif
+	/* Sync undo, so the effect of e.g., setline() can be undone. */
+	u_sync(TRUE);
+	ins_need_undo = TRUE;
+
 	regname = get_expr_register();
 # ifdef USE_IM_CONTROL
 	/* Restore the Input Method. */
 	if (im_on)
 	    im_set_active(TRUE);
 # endif
-	if (regname == '=')
-	    /* sync undo, so the effect of e.g., setline() can be undone */
-	    u_sync(TRUE);
+	Insstart = curwin->w_cursor;
     }
     if (regname == NUL || !valid_yank_reg(regname, FALSE))
     {
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1253,
+/**/
     1252,
 /**/
     1251,