Patch 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)
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/testdir/test89.in,
            src/testdir/test89.ok


*** ../vim-7.3.809/src/option.c 2013-01-17 17:37:31.000000000 +0100
--- src/option.c        2013-02-13 15:40:12.000000000 +0100
***************
*** 7109,7115 ****
      return errmsg;
  }
  
! #ifdef FEAT_SYN_HL
  /*
   * Simple int comparison function for use with qsort()
   */
--- 7109,7115 ----
      return errmsg;
  }
  
! #if defined(FEAT_SYN_HL) || defined(PROTO)
  /*
   * Simple int comparison function for use with qsort()
   */
***************
*** 7630,7646 ****
      }
  #endif
  
!     /* 'list', 'number' */
!     else if ((int *)varp == &curwin->w_p_list
!         || (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;
        if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu)
            curwin->w_p_nu = FALSE;
      }
  
      else if ((int *)varp == &curbuf->b_p_ro)
--- 7630,7651 ----
      }
  #endif
  
!     /* '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)
*** ../vim-7.3.809/src/testdir/Make_amiga.mak   2012-12-05 16:10:21.000000000 
+0100
--- src/testdir/Make_amiga.mak  2013-02-13 15:01:32.000000000 +0100
***************
*** 31,37 ****
                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
  
  .SUFFIXES: .in .out
  
--- 31,38 ----
                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 \
!               test89.out
  
  .SUFFIXES: .in .out
  
***************
*** 136,138 ****
--- 137,140 ----
  test83.out: test83.in
  test84.out: test84.in
  test88.out: test88.in
+ test89.out: test89.in
*** ../vim-7.3.809/src/testdir/Make_dos.mak     2012-12-05 16:10:21.000000000 
+0100
--- src/testdir/Make_dos.mak    2013-02-13 15:00:59.000000000 +0100
***************
*** 30,36 ****
                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
  
  SCRIPTS32 =   test50.out test70.out
  
--- 30,37 ----
                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 \
!               test89.out
  
  SCRIPTS32 =   test50.out test70.out
  
*** ../vim-7.3.809/src/testdir/Make_ming.mak    2012-12-05 16:10:21.000000000 
+0100
--- src/testdir/Make_ming.mak   2013-02-13 15:01:16.000000000 +0100
***************
*** 50,56 ****
                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
  
  SCRIPTS32 =   test50.out test70.out
  
--- 50,57 ----
                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 \
!               test89.out
  
  SCRIPTS32 =   test50.out test70.out
  
*** ../vim-7.3.809/src/testdir/Make_os2.mak     2012-12-05 16:10:21.000000000 
+0100
--- src/testdir/Make_os2.mak    2013-02-13 15:00:59.000000000 +0100
***************
*** 31,37 ****
                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
  
  .SUFFIXES: .in .out
  
--- 31,38 ----
                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 \
!               test89.out
  
  .SUFFIXES: .in .out
  
*** ../vim-7.3.809/src/testdir/Make_vms.mms     2012-12-05 16:10:21.000000000 
+0100
--- src/testdir/Make_vms.mms    2013-02-13 15:00:59.000000000 +0100
***************
*** 76,82 ****
         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
  
  # Known problems:
  # Test 30: a problem around mac format - unknown reason
--- 76,82 ----
         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 test89.out
  
  # Known problems:
  # Test 30: a problem around mac format - unknown reason
*** ../vim-7.3.809/src/testdir/Makefile 2012-12-05 18:21:28.000000000 +0100
--- src/testdir/Makefile        2013-02-13 15:00:59.000000000 +0100
***************
*** 27,33 ****
                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
  
  SCRIPTS_GUI = test16.out
  
--- 27,34 ----
                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 \
!               test89.out
  
  SCRIPTS_GUI = test16.out
  
*** ../vim-7.3.809/src/testdir/test89.in        2013-02-13 15:43:44.000000000 
+0100
--- src/testdir/test89.in       2013-02-13 15:07:28.000000000 +0100
***************
*** 0 ****
--- 1,15 ----
+ Some tests for setting 'number' and 'relativenumber'
+ 
+ STARTTEST
+ :set hidden nocp nu rnu
+ :redir @a | set nu? rnu? | redir END
+ :e! xx
+ :redir @b | set nu? rnu? | redir END
+ :e! #
+ :$put ='results:'
+ :$put a
+ :$put b
+ :/^results/,$w! test.out
+ :q!
+ ENDTEST
+ 
*** ../vim-7.3.809/src/testdir/test89.ok        2013-02-13 15:43:44.000000000 
+0100
--- src/testdir/test89.ok       2013-02-13 15:08:05.000000000 +0100
***************
*** 0 ****
--- 1,7 ----
+ results:
+ 
+ nonumber
+   relativenumber
+ 
+ nonumber
+   relativenumber
*** ../vim-7.3.809/src/version.c        2013-02-13 14:36:39.000000000 +0100
--- src/version.c       2013-02-13 15:42:18.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
  {   /* Add new patch number below this line */
+ /**/
+     810,
  /**/

-- 
A law to reduce crime states: "It is mandatory for a motorist with criminal
intentions to stop at the city limits and telephone the chief of police as he
is entering the town.
                [real standing law in Washington, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui