| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.810 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| 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 |
| |
| |
| |
| |
| |
| *** 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) |
| |
| |
| |
| *** 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 |
| |
| |
| |
| *** 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 |
| |
| |
| |
| |
| *** 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 |
| |
| |
| |
| |
| *** 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 |
| |
| |
| |
| |
| *** 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 |
| |
| |
| |
| *** 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 |
| |
| |
| |
| |
| |
| --- 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 |
| + |
| |
| |
| |
| |
| --- 1,7 ---- |
| + results: |
| + |
| + nonumber |
| + relativenumber |
| + |
| + nonumber |
| + relativenumber |
| |
| |
| |
| *** 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 -- Bram@Moolenaar.net -- 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 /// |