comparison src/option.c @ 13:24d5189d3956

updated for version 7.0005
author vimboss
date Sat, 03 Jul 2004 16:05:59 +0000
parents bdeee1504ac1
children 946da5994c01
comparison
equal deleted inserted replaced
12:bdeee1504ac1 13:24d5189d3956
104 , PV_MOD 104 , PV_MOD
105 , PV_MP 105 , PV_MP
106 , PV_MPS 106 , PV_MPS
107 , PV_NF 107 , PV_NF
108 , PV_NU 108 , PV_NU
109 , PV_NUW
109 , PV_OFT 110 , PV_OFT
110 , PV_PATH 111 , PV_PATH
111 , PV_PI 112 , PV_PI
112 , PV_PVW 113 , PV_PVW
113 , PV_QE 114 , PV_QE
1544 (char_u *)&p_nf, PV_NF, 1545 (char_u *)&p_nf, PV_NF,
1545 {(char_u *)"octal,hex", (char_u *)0L}}, 1546 {(char_u *)"octal,hex", (char_u *)0L}},
1546 {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN, 1547 {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
1547 (char_u *)VAR_WIN, PV_NU, 1548 (char_u *)VAR_WIN, PV_NU,
1548 {(char_u *)FALSE, (char_u *)0L}}, 1549 {(char_u *)FALSE, (char_u *)0L}},
1550 {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
1551 #ifdef FEAT_LINEBREAK
1552 (char_u *)VAR_WIN, PV_NUW,
1553 #else
1554 (char_u *)NULL, PV_NONE,
1555 #endif
1556 {(char_u *)8L, (char_u *)4L}},
1549 {"open", NULL, P_BOOL|P_VI_DEF, 1557 {"open", NULL, P_BOOL|P_VI_DEF,
1550 (char_u *)NULL, PV_NONE, 1558 (char_u *)NULL, PV_NONE,
1551 {(char_u *)FALSE, (char_u *)0L}}, 1559 {(char_u *)FALSE, (char_u *)0L}},
1552 {"optimize", "opt", P_BOOL|P_VI_DEF, 1560 {"optimize", "opt", P_BOOL|P_VI_DEF,
1553 (char_u *)NULL, PV_NONE, 1561 (char_u *)NULL, PV_NONE,
1596 #endif 1604 #endif
1597 (char_u *)0L}}, 1605 (char_u *)0L}},
1598 {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM, 1606 {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
1599 (char_u *)&p_pi, PV_PI, 1607 (char_u *)&p_pi, PV_PI,
1600 {(char_u *)FALSE, (char_u *)0L}}, 1608 {(char_u *)FALSE, (char_u *)0L}},
1601 {"previewheight", "pvh",P_NUM|P_VI_DEF, 1609 {"previewheight", "pvh", P_NUM|P_VI_DEF,
1602 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) 1610 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
1603 (char_u *)&p_pvh, PV_NONE, 1611 (char_u *)&p_pvh, PV_NONE,
1604 #else 1612 #else
1605 (char_u *)NULL, PV_NONE, 1613 (char_u *)NULL, PV_NONE,
1606 #endif 1614 #endif
6629 } 6637 }
6630 win_setminheight(); 6638 win_setminheight();
6631 } 6639 }
6632 6640
6633 # ifdef FEAT_VERTSPLIT 6641 # ifdef FEAT_VERTSPLIT
6634 if (pp == &p_wiw) 6642 else if (pp == &p_wiw)
6635 { 6643 {
6636 if (p_wiw < 1) 6644 if (p_wiw < 1)
6637 { 6645 {
6638 errmsg = e_positive; 6646 errmsg = e_positive;
6639 p_wiw = 1; 6647 p_wiw = 1;
6806 /* use the old value, otherwise u_sync() may not work properly */ 6814 /* use the old value, otherwise u_sync() may not work properly */
6807 p_ul = old_value; 6815 p_ul = old_value;
6808 u_sync(); 6816 u_sync();
6809 p_ul = value; 6817 p_ul = value;
6810 } 6818 }
6819
6820 #ifdef FEAT_LINEBREAK
6821 /* 'numberwidth' must be positive */
6822 else if (pp == &curwin->w_p_nuw)
6823 {
6824 if (curwin->w_p_nuw < 1)
6825 {
6826 errmsg = e_positive;
6827 curwin->w_p_nuw = 1;
6828 }
6829 if (curwin->w_p_nuw > 10)
6830 {
6831 errmsg = e_invarg;
6832 curwin->w_p_nuw = 10;
6833 }
6834 curwin->w_nrwidth_line_count = 0;
6835 }
6836 #endif
6811 6837
6812 /* 6838 /*
6813 * Check the bounds for numeric options here 6839 * Check the bounds for numeric options here
6814 */ 6840 */
6815 if (Rows < min_rows() && full_screen) 6841 if (Rows < min_rows() && full_screen)
7855 case PV_FDT: return (char_u *)&(curwin->w_p_fdt); 7881 case PV_FDT: return (char_u *)&(curwin->w_p_fdt);
7856 # endif 7882 # endif
7857 case PV_FMR: return (char_u *)&(curwin->w_p_fmr); 7883 case PV_FMR: return (char_u *)&(curwin->w_p_fmr);
7858 #endif 7884 #endif
7859 case PV_NU: return (char_u *)&(curwin->w_p_nu); 7885 case PV_NU: return (char_u *)&(curwin->w_p_nu);
7886 #ifdef FEAT_LINEBREAK
7887 case PV_NUW: return (char_u *)&(curwin->w_p_nuw);
7888 #endif
7860 #if defined(FEAT_WINDOWS) 7889 #if defined(FEAT_WINDOWS)
7861 case PV_WFH: return (char_u *)&(curwin->w_p_wfh); 7890 case PV_WFH: return (char_u *)&(curwin->w_p_wfh);
7862 #endif 7891 #endif
7863 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) 7892 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
7864 case PV_PVW: return (char_u *)&(curwin->w_p_pvw); 7893 case PV_PVW: return (char_u *)&(curwin->w_p_pvw);
8023 #ifdef FEAT_ARABIC 8052 #ifdef FEAT_ARABIC
8024 to->wo_arab = from->wo_arab; 8053 to->wo_arab = from->wo_arab;
8025 #endif 8054 #endif
8026 to->wo_list = from->wo_list; 8055 to->wo_list = from->wo_list;
8027 to->wo_nu = from->wo_nu; 8056 to->wo_nu = from->wo_nu;
8057 #ifdef FEAT_LINEBREAK
8058 to->wo_nuw = from->wo_nuw;
8059 #endif
8028 #ifdef FEAT_RIGHTLEFT 8060 #ifdef FEAT_RIGHTLEFT
8029 to->wo_rl = from->wo_rl; 8061 to->wo_rl = from->wo_rl;
8030 to->wo_rlc = vim_strsave(from->wo_rlc); 8062 to->wo_rlc = vim_strsave(from->wo_rlc);
8031 #endif 8063 #endif
8032 to->wo_wrap = from->wo_wrap; 8064 to->wo_wrap = from->wo_wrap;