From f4e5e86627abe926ad201ef7dfa64b01bbef7567 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Wed, 13 Feb 2013 15:44:26 +0100
Subject: [PATCH] =?UTF-8?q?updated=20for=20version=207.3.810=20Problem:=20?=
 =?UTF-8?q?=20=20=20'relativenumber=20is=20reset=20unexpectedly.=20(Fran?=
 =?UTF-8?q?=C3=A7ois=20Ingelrest)=20Solution:=20=20=20After=20an=20option?=
 =?UTF-8?q?=20was=20reset=20also=20reset=20the=20global=20value.=20Add=20a?=
 =?UTF-8?q?=20test.=20=20=20=20=20=20=20=20=20=20=20=20=20(Christian=20Bra?=
 =?UTF-8?q?bandt)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/option.c               | 13 +++++++++----
 src/testdir/Make_amiga.mak |  4 +++-
 src/testdir/Make_dos.mak   |  3 ++-
 src/testdir/Make_ming.mak  |  3 ++-
 src/testdir/Make_os2.mak   |  3 ++-
 src/testdir/Make_vms.mms   |  2 +-
 src/testdir/Makefile       |  3 ++-
 src/version.c              |  2 ++
 8 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/src/option.c b/src/option.c
index f38e9c7066..adb501be88 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7109,7 +7109,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
     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, opt_flags)
     }
 #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)
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
index 701c304fcd..c1a8bd6b85 100644
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -31,7 +31,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.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
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index e902be3be5..fb52e80793 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -30,7 +30,8 @@ SCRIPTS =	test3.out test4.out test5.out test6.out test7.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
 
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index c7bbb540f6..8aab596aa5 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -50,7 +50,8 @@ SCRIPTS =	test3.out test4.out test5.out test6.out test7.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
 
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
index d930926009..d052855d3f 100644
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -31,7 +31,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.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
 
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index 5398031339..df5b6602dd 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -76,7 +76,7 @@ SCRIPT = test1.out  test2.out  test3.out  test4.out  test5.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
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index d29b4f5b15..6ca89dc9d4 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -27,7 +27,8 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.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
 
diff --git a/src/version.c b/src/version.c
index b2ea5c0f54..453d817ee2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -725,6 +725,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    810,
 /**/
     809,
 /**/
-- 
GitLab