changeset 4113:8904ccd5ee85 v7.3.810

updated for version 7.3.810 Problem: 'relativenumber is reset unexpectedly. (Fran?ois Ingelrest) Solution: After an option was reset also reset the global value. Add a test. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 13 Feb 2013 15:44:26 +0100
parents b3cfd82f44d9
children 62d3e3fbcd7e
files src/option.c 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/version.c
diffstat 8 files changed, 23 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -7109,7 +7109,7 @@ did_set_string_option(opt_idx, varp, new
     return errmsg;
 }
 
-#ifdef FEAT_SYN_HL
+#if defined(FEAT_SYN_HL) || defined(PROTO)
 /*
  * Simple int comparison function for use with qsort()
  */
@@ -7630,17 +7630,22 @@ set_bool_option(opt_idx, varp, value, op
     }
 #endif
 
-    /* 'list', 'number' */
-    else if ((int *)varp == &curwin->w_p_list
-	  || (int *)varp == &curwin->w_p_nu
+    /* 'number', 'relativenumber' */
+    else if ((int *)varp == &curwin->w_p_nu
 	  || (int *)varp == &curwin->w_p_rnu)
     {
 	/* If 'number' is set, reset 'relativenumber'. */
 	/* If 'relativenumber' is set, reset 'number'. */
 	if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu)
+	{
 	    curwin->w_p_rnu = FALSE;
+	    curwin->w_allbuf_opt.wo_rnu = FALSE;
+	}
 	if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu)
+	{
 	    curwin->w_p_nu = FALSE;
+	    curwin->w_allbuf_opt.wo_nu = FALSE;
+	}
     }
 
     else if ((int *)varp == &curbuf->b_p_ro)
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -31,7 +31,8 @@ SCRIPTS = test1.out test3.out test4.out 
 		test66.out test67.out test68.out test69.out test70.out \
 		test71.out test72.out test73.out test74.out test75.out \
 		test76.out test77.out test78.out test79.out test80.out \
-		test81.out test82.out test83.out test84.out test88.out
+		test81.out test82.out test83.out test84.out test88.out \
+		test89.out
 
 .SUFFIXES: .in .out
 
@@ -136,3 +137,4 @@ test82.out: test82.in
 test83.out: test83.in
 test84.out: test84.in
 test88.out: test88.in
+test89.out: test89.in
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -30,7 +30,8 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test68.out test69.out test71.out test72.out test73.out \
 		test74.out test75.out test76.out test77.out test78.out \
 		test79.out test80.out test81.out test82.out test83.out \
-		test84.out test85.out test86.out test87.out test88.out
+		test84.out test85.out test86.out test87.out test88.out \
+		test89.out
 
 SCRIPTS32 =	test50.out test70.out
 
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -50,7 +50,8 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test68.out test69.out test71.out test72.out test73.out \
 		test74.out test75.out test76.out test77.out test78.out \
 		test79.out test80.out test81.out test82.out test83.out \
-		test84.out test85.out test86.out test87.out test88.out
+		test84.out test85.out test86.out test87.out test88.out \
+		test89.out
 
 SCRIPTS32 =	test50.out test70.out
 
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -31,7 +31,8 @@ SCRIPTS = test1.out test3.out test4.out 
 		test66.out test67.out test68.out test69.out test70.out \
 		test71.out test72.out test73.out test74.out test75.out \
 		test76.out test77.out test78.out test79.out test80.out \
-		test81.out test82.out test83.out test84.out test88.out
+		test81.out test82.out test83.out test84.out test88.out \
+		test89.out
 
 .SUFFIXES: .in .out
 
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -76,7 +76,7 @@ SCRIPT = test1.out  test2.out  test3.out
 	 test66.out test67.out test68.out test69.out \
 	 test71.out test72.out test74.out test75.out test76.out \
 	 test77.out test78.out test79.out test80.out test81.out \
-	 test82.out test83.out test84.out test88.out
+	 test82.out test83.out test84.out test88.out test89.out
 
 # Known problems:
 # Test 30: a problem around mac format - unknown reason
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -27,7 +27,8 @@ SCRIPTS = test1.out test2.out test3.out 
 		test69.out test70.out test71.out test72.out test73.out \
 		test74.out test75.out test76.out test77.out test78.out \
 		test79.out test80.out test81.out test82.out test83.out \
-		test84.out test85.out test86.out test87.out test88.out
+		test84.out test85.out test86.out test87.out test88.out \
+		test89.out
 
 SCRIPTS_GUI = test16.out
 
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    810,
+/**/
     809,
 /**/
     808,