changeset 6616:290631797b76 v7.4.634

updated for version 7.4.634 Problem: Marks are not restored after redo + undo. Solution: Fix the way marks are restored. (Olaf Dabrunz)
author Bram Moolenaar <bram@vim.org>
date Tue, 17 Feb 2015 13:43:40 +0100
parents 16cde4ab7635
children ee31638d1adf
files src/testdir/Make_amiga.mak src/testdir/Make_dos.mak src/testdir/Make_ming.mak src/testdir/Make_os2.mak src/testdir/Make_vms.mms src/testdir/Makefile src/undo.c src/version.c
diffstat 8 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -48,6 +48,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test_listlbr.out \
 		test_listlbr_utf8.out \
 		test_mapping.out \
+		test_marks.out \
 		test_nested_function.out \
 		test_options.out \
 		test_qf_title.out \
@@ -188,6 +189,7 @@ test_insertcount.out: test_insertcount.i
 test_listlbr.out: test_listlbr.in
 test_listlbr_utf8.out: test_listlbr_utf8.in
 test_mapping.out: test_mapping.in
+test_marks.out: test_marks.in
 test_nested_function.out: test_nested_function.in
 test_options.out: test_options.in
 test_qf_title.out: test_qf_title.in
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -47,6 +47,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test_listlbr.out \
 		test_listlbr_utf8.out \
 		test_mapping.out \
+		test_marks.out \
 		test_nested_function.out \
 		test_options.out \
 		test_qf_title.out \
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -69,6 +69,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test_listlbr.out \
 		test_listlbr_utf8.out \
 		test_mapping.out \
+		test_marks.out \
 		test_nested_function.out \
 		test_options.out \
 		test_qf_title.out \
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -49,6 +49,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test_listlbr.out \
 		test_listlbr_utf8.out \
 		test_mapping.out \
+		test_marks.out \
 		test_nested_function.out \
 		test_options.out \
 		test_qf_title.out \
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -108,6 +108,7 @@ SCRIPT = test1.out  test2.out  test3.out
 	 test_listlbr.out \
 	 test_listlbr_utf8.out \
 	 test_mapping.out \
+	 test_marks.out \
 	 test_nested_function.out \
 	 test_options.out \
 	 test_qf_title.out \
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -45,6 +45,7 @@ SCRIPTS = test1.out test2.out test3.out 
 		test_listlbr.out \
 		test_listlbr_utf8.out \
 		test_mapping.out \
+		test_marks.out \
 		test_nested_function.out \
 		test_options.out \
 		test_qf_title.out \
--- a/src/undo.c
+++ b/src/undo.c
@@ -2847,11 +2847,14 @@ u_undoredo(undo)
      * restore marks from before undo/redo
      */
     for (i = 0; i < NMARKS; ++i)
+    {
 	if (curhead->uh_namedm[i].lnum != 0)
-	{
 	    curbuf->b_namedm[i] = curhead->uh_namedm[i];
+	if (namedm[i].lnum != 0)
 	    curhead->uh_namedm[i] = namedm[i];
-	}
+	else
+	    curhead->uh_namedm[i].lnum = 0;
+    }
     if (curhead->uh_visual.vi_start.lnum != 0)
     {
 	curbuf->b_visual = curhead->uh_visual;
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    634,
+/**/
     633,
 /**/
     632,