Karsten Hopp 5e08df
To: vim_dev@googlegroups.com
Karsten Hopp 5e08df
Subject: Patch 7.3.810
Karsten Hopp 5e08df
Fcc: outbox
Karsten Hopp 5e08df
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 5e08df
Mime-Version: 1.0
Karsten Hopp 5e08df
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 5e08df
Content-Transfer-Encoding: 8bit
Karsten Hopp 5e08df
------------
Karsten Hopp 5e08df
Karsten Hopp 5e08df
Patch 7.3.810
Karsten Hopp 5e08df
Problem:    'relativenumber is reset unexpectedly. (François Ingelrest)
Karsten Hopp 5e08df
Solution:   After an option was reset also reset the global value. Add a test.
Karsten Hopp 5e08df
	    (Christian Brabandt)
Karsten Hopp 5e08df
Files:	    src/option.c, src/testdir/Make_amiga.mak,
Karsten Hopp 5e08df
	    src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
Karsten Hopp 5e08df
	    src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
Karsten Hopp 5e08df
	    src/testdir/Makefile, src/testdir/test89.in,
Karsten Hopp 5e08df
	    src/testdir/test89.ok
Karsten Hopp 5e08df
Karsten Hopp 5e08df
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/option.c	2013-01-17 17:37:31.000000000 +0100
Karsten Hopp 5e08df
--- src/option.c	2013-02-13 15:40:12.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 7109,7115 ****
Karsten Hopp 5e08df
      return errmsg;
Karsten Hopp 5e08df
  }
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
! #ifdef FEAT_SYN_HL
Karsten Hopp 5e08df
  /*
Karsten Hopp 5e08df
   * Simple int comparison function for use with qsort()
Karsten Hopp 5e08df
   */
Karsten Hopp 5e08df
--- 7109,7115 ----
Karsten Hopp 5e08df
      return errmsg;
Karsten Hopp 5e08df
  }
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
! #if defined(FEAT_SYN_HL) || defined(PROTO)
Karsten Hopp 5e08df
  /*
Karsten Hopp 5e08df
   * Simple int comparison function for use with qsort()
Karsten Hopp 5e08df
   */
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 7630,7646 ****
Karsten Hopp 5e08df
      }
Karsten Hopp 5e08df
  #endif
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
!     /* 'list', 'number' */
Karsten Hopp 5e08df
!     else if ((int *)varp == &curwin->w_p_list
Karsten Hopp 5e08df
! 	  || (int *)varp == &curwin->w_p_nu
Karsten Hopp 5e08df
  	  || (int *)varp == &curwin->w_p_rnu)
Karsten Hopp 5e08df
      {
Karsten Hopp 5e08df
  	/* If 'number' is set, reset 'relativenumber'. */
Karsten Hopp 5e08df
  	/* If 'relativenumber' is set, reset 'number'. */
Karsten Hopp 5e08df
  	if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu)
Karsten Hopp 5e08df
  	    curwin->w_p_rnu = FALSE;
Karsten Hopp 5e08df
  	if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu)
Karsten Hopp 5e08df
  	    curwin->w_p_nu = FALSE;
Karsten Hopp 5e08df
      }
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
      else if ((int *)varp == &curbuf->b_p_ro)
Karsten Hopp 5e08df
--- 7630,7651 ----
Karsten Hopp 5e08df
      }
Karsten Hopp 5e08df
  #endif
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
!     /* 'number', 'relativenumber' */
Karsten Hopp 5e08df
!     else if ((int *)varp == &curwin->w_p_nu
Karsten Hopp 5e08df
  	  || (int *)varp == &curwin->w_p_rnu)
Karsten Hopp 5e08df
      {
Karsten Hopp 5e08df
  	/* If 'number' is set, reset 'relativenumber'. */
Karsten Hopp 5e08df
  	/* If 'relativenumber' is set, reset 'number'. */
Karsten Hopp 5e08df
  	if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu)
Karsten Hopp 5e08df
+ 	{
Karsten Hopp 5e08df
  	    curwin->w_p_rnu = FALSE;
Karsten Hopp 5e08df
+ 	    curwin->w_allbuf_opt.wo_rnu = FALSE;
Karsten Hopp 5e08df
+ 	}
Karsten Hopp 5e08df
  	if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu)
Karsten Hopp 5e08df
+ 	{
Karsten Hopp 5e08df
  	    curwin->w_p_nu = FALSE;
Karsten Hopp 5e08df
+ 	    curwin->w_allbuf_opt.wo_nu = FALSE;
Karsten Hopp 5e08df
+ 	}
Karsten Hopp 5e08df
      }
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
      else if ((int *)varp == &curbuf->b_p_ro)
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/Make_amiga.mak	2012-12-05 16:10:21.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/Make_amiga.mak	2013-02-13 15:01:32.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 31,37 ****
Karsten Hopp 5e08df
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 5e08df
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 5e08df
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 5e08df
! 		test81.out test82.out test83.out test84.out test88.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  .SUFFIXES: .in .out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
--- 31,38 ----
Karsten Hopp 5e08df
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 5e08df
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 5e08df
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 5e08df
! 		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 5e08df
! 		test89.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  .SUFFIXES: .in .out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 136,138 ****
Karsten Hopp 5e08df
--- 137,140 ----
Karsten Hopp 5e08df
  test83.out: test83.in
Karsten Hopp 5e08df
  test84.out: test84.in
Karsten Hopp 5e08df
  test88.out: test88.in
Karsten Hopp 5e08df
+ test89.out: test89.in
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/Make_dos.mak	2012-12-05 16:10:21.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/Make_dos.mak	2013-02-13 15:00:59.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 30,36 ****
Karsten Hopp 5e08df
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 5e08df
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 5e08df
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 5e08df
! 		test84.out test85.out test86.out test87.out test88.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
--- 30,37 ----
Karsten Hopp 5e08df
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 5e08df
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 5e08df
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 5e08df
! 		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 5e08df
! 		test89.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/Make_ming.mak	2012-12-05 16:10:21.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/Make_ming.mak	2013-02-13 15:01:16.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 50,56 ****
Karsten Hopp 5e08df
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 5e08df
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 5e08df
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 5e08df
! 		test84.out test85.out test86.out test87.out test88.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
--- 50,57 ----
Karsten Hopp 5e08df
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 5e08df
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 5e08df
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 5e08df
! 		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 5e08df
! 		test89.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/Make_os2.mak	2012-12-05 16:10:21.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/Make_os2.mak	2013-02-13 15:00:59.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 31,37 ****
Karsten Hopp 5e08df
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 5e08df
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 5e08df
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 5e08df
! 		test81.out test82.out test83.out test84.out test88.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  .SUFFIXES: .in .out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
--- 31,38 ----
Karsten Hopp 5e08df
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 5e08df
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 5e08df
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 5e08df
! 		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 5e08df
! 		test89.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  .SUFFIXES: .in .out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/Make_vms.mms	2012-12-05 16:10:21.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/Make_vms.mms	2013-02-13 15:00:59.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 76,82 ****
Karsten Hopp 5e08df
  	 test66.out test67.out test68.out test69.out \
Karsten Hopp 5e08df
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp 5e08df
  	 test77.out test78.out test79.out test80.out test81.out \
Karsten Hopp 5e08df
! 	 test82.out test83.out test84.out test88.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  # Known problems:
Karsten Hopp 5e08df
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 5e08df
--- 76,82 ----
Karsten Hopp 5e08df
  	 test66.out test67.out test68.out test69.out \
Karsten Hopp 5e08df
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp 5e08df
  	 test77.out test78.out test79.out test80.out test81.out \
Karsten Hopp 5e08df
! 	 test82.out test83.out test84.out test88.out test89.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  # Known problems:
Karsten Hopp 5e08df
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/Makefile	2012-12-05 18:21:28.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/Makefile	2013-02-13 15:00:59.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 27,33 ****
Karsten Hopp 5e08df
  		test69.out test70.out test71.out test72.out test73.out \
Karsten Hopp 5e08df
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 5e08df
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 5e08df
! 		test84.out test85.out test86.out test87.out test88.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  SCRIPTS_GUI = test16.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
--- 27,34 ----
Karsten Hopp 5e08df
  		test69.out test70.out test71.out test72.out test73.out \
Karsten Hopp 5e08df
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 5e08df
  		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 5e08df
! 		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 5e08df
! 		test89.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
  SCRIPTS_GUI = test16.out
Karsten Hopp 5e08df
  
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/test89.in	2013-02-13 15:43:44.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/test89.in	2013-02-13 15:07:28.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 0 ****
Karsten Hopp 5e08df
--- 1,15 ----
Karsten Hopp 5e08df
+ Some tests for setting 'number' and 'relativenumber'
Karsten Hopp 5e08df
+ 
Karsten Hopp 5e08df
+ STARTTEST
Karsten Hopp 5e08df
+ :set hidden nocp nu rnu
Karsten Hopp 5e08df
+ :redir @a | set nu? rnu? | redir END
Karsten Hopp 5e08df
+ :e! xx
Karsten Hopp 5e08df
+ :redir @b | set nu? rnu? | redir END
Karsten Hopp 5e08df
+ :e! #
Karsten Hopp 5e08df
+ :$put ='results:'
Karsten Hopp 5e08df
+ :$put a
Karsten Hopp 5e08df
+ :$put b
Karsten Hopp 5e08df
+ :/^results/,$w! test.out
Karsten Hopp 5e08df
+ :q!
Karsten Hopp 5e08df
+ ENDTEST
Karsten Hopp 5e08df
+ 
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/testdir/test89.ok	2013-02-13 15:43:44.000000000 +0100
Karsten Hopp 5e08df
--- src/testdir/test89.ok	2013-02-13 15:08:05.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 0 ****
Karsten Hopp 5e08df
--- 1,7 ----
Karsten Hopp 5e08df
+ results:
Karsten Hopp 5e08df
+ 
Karsten Hopp 5e08df
+ nonumber
Karsten Hopp 5e08df
+   relativenumber
Karsten Hopp 5e08df
+ 
Karsten Hopp 5e08df
+ nonumber
Karsten Hopp 5e08df
+   relativenumber
Karsten Hopp 5e08df
*** ../vim-7.3.809/src/version.c	2013-02-13 14:36:39.000000000 +0100
Karsten Hopp 5e08df
--- src/version.c	2013-02-13 15:42:18.000000000 +0100
Karsten Hopp 5e08df
***************
Karsten Hopp 5e08df
*** 727,728 ****
Karsten Hopp 5e08df
--- 727,730 ----
Karsten Hopp 5e08df
  {   /* Add new patch number below this line */
Karsten Hopp 5e08df
+ /**/
Karsten Hopp 5e08df
+     810,
Karsten Hopp 5e08df
  /**/
Karsten Hopp 5e08df
Karsten Hopp 5e08df
-- 
Karsten Hopp 5e08df
A law to reduce crime states: "It is mandatory for a motorist with criminal
Karsten Hopp 5e08df
intentions to stop at the city limits and telephone the chief of police as he
Karsten Hopp 5e08df
is entering the town.
Karsten Hopp 5e08df
		[real standing law in Washington, United States of America]
Karsten Hopp 5e08df
Karsten Hopp 5e08df
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 5e08df
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 5e08df
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 5e08df
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///