diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-25 22:18:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-25 22:18:43 +0100 |
commit | a713ff819d134dc34e507c05273c935bfc17e795 (patch) | |
tree | 354df0cee3a26436ddba8cd6d745f445772e6fcf | |
parent | 14c2e18b63faaa4056d987fd501a68480cb40c5c (diff) | |
download | vim-git-8.0.0372.tar.gz |
patch 8.0.0372: more options are not always definedv8.0.0372
Problem: More options are not always defined.
Solution: Consistently define all possible options.
-rw-r--r-- | src/option.c | 172 | ||||
-rw-r--r-- | src/testdir/test_expand_dllpath.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 137 insertions, 39 deletions
diff --git a/src/option.c b/src/option.c index d948ac696..959af4fa4 100644 --- a/src/option.c +++ b/src/option.c @@ -559,11 +559,15 @@ static struct vimoption options[] = {(char_u *)0L, (char_u *)0L} #endif SCRIPTID_INIT}, -#ifdef FEAT_AUTOCHDIR {"autochdir", "acd", P_BOOL|P_VI_DEF, +#ifdef FEAT_AUTOCHDIR (char_u *)&p_acd, PV_NONE, - {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)FALSE, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif + SCRIPTID_INIT}, {"autoindent", "ai", P_BOOL|P_VI_DEF, (char_u *)&p_ai, PV_AI, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, @@ -1210,62 +1214,125 @@ static struct vimoption options[] = {"flash", "fl", P_BOOL|P_VI_DEF, (char_u *)NULL, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, -#ifdef FEAT_FOLDING {"foldclose", "fcl", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)&p_fcl, PV_NONE, - {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)"", (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FDC, - {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)FALSE, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FEN, - {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)TRUE, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, -# ifdef FEAT_EVAL +#if defined(FEAT_FOLDING) && defined(FEAT_EVAL) (char_u *)VAR_WIN, PV_FDE, {(char_u *)"0", (char_u *)NULL} -# else +#else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} -# endif +#endif SCRIPTID_INIT}, {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FDI, - {(char_u *)"#", (char_u *)NULL} SCRIPTID_INIT}, + {(char_u *)"#", (char_u *)NULL} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FDL, - {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)0L, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT, +#ifdef FEAT_FOLDING (char_u *)&p_fdls, PV_NONE, - {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)-1L, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF| +#ifdef FEAT_FOLDING P_RWIN|P_ONECOMMA|P_NODUP, (char_u *)VAR_WIN, PV_FMR, {(char_u *)"{{{,}}}", (char_u *)NULL} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif SCRIPTID_INIT}, {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FDM, - {(char_u *)"manual", (char_u *)NULL} SCRIPTID_INIT}, + {(char_u *)"manual", (char_u *)NULL} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FML, - {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)1L, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN, +#ifdef FEAT_FOLDING (char_u *)VAR_WIN, PV_FDN, - {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)20L, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldopen", "fdo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_CURSWANT, +#ifdef FEAT_FOLDING (char_u *)&p_fdo, PV_NONE, {(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo", - (char_u *)0L} SCRIPTID_INIT}, + (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} +#endif + SCRIPTID_INIT}, {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, -# ifdef FEAT_EVAL +#if defined(FEAT_FOLDING) && defined(FEAT_EVAL) (char_u *)VAR_WIN, PV_FDT, {(char_u *)"foldtext()", (char_u *)NULL} -# else +#else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} -# endif - SCRIPTID_INIT}, #endif + SCRIPTID_INIT}, {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, #ifdef FEAT_EVAL (char_u *)&p_fex, PV_FEX, @@ -1803,17 +1870,24 @@ static struct vimoption options[] = {"loadplugins", "lpl", P_BOOL|P_VI_DEF, (char_u *)&p_lpl, PV_NONE, {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, -#if defined(DYNAMIC_LUA) {"luadll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, +#if defined(DYNAMIC_LUA) (char_u *)&p_luadll, PV_NONE, {(char_u *)DYNAMIC_LUA_DLL, (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} #endif -#ifdef FEAT_GUI_MAC + SCRIPTID_INIT}, {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR, +#ifdef FEAT_GUI_MAC (char_u *)&p_macatsui, PV_NONE, - {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)TRUE, (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} #endif + SCRIPTID_INIT}, {"magic", NULL, P_BOOL|P_VI_DEF, (char_u *)&p_magic, PV_NONE, {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, @@ -2045,12 +2119,15 @@ static struct vimoption options[] = (char_u *)".,/usr/include,,", #endif (char_u *)0L} SCRIPTID_INIT}, -#if defined(DYNAMIC_PERL) {"perldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, +#if defined(DYNAMIC_PERL) (char_u *)&p_perldll, PV_NONE, {(char_u *)DYNAMIC_PERL_DLL, (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif + SCRIPTID_INIT}, {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM, (char_u *)&p_pi, PV_PI, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, @@ -2156,18 +2233,24 @@ static struct vimoption options[] = (char_u *)NULL, PV_NONE, #endif {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, -#if defined(DYNAMIC_PYTHON3) {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, +#if defined(DYNAMIC_PYTHON3) (char_u *)&p_py3dll, PV_NONE, {(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} #endif -#if defined(DYNAMIC_PYTHON) + SCRIPTID_INIT}, {"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, +#if defined(DYNAMIC_PYTHON) (char_u *)&p_pydll, PV_NONE, {(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} #endif + SCRIPTID_INIT}, {"pyxversion", "pyx", P_NUM|P_VI_DEF|P_SECURE, #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) (char_u *)&p_pyx, PV_NONE, @@ -2249,12 +2332,15 @@ static struct vimoption options[] = {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, -#if defined(DYNAMIC_RUBY) {"rubydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, +#if defined(DYNAMIC_RUBY) (char_u *)&p_rubydll, PV_NONE, {(char_u *)DYNAMIC_RUBY_DLL, (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} #endif + SCRIPTID_INIT}, {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT, #ifdef FEAT_CMDL_INFO (char_u *)&p_ru, PV_NONE, @@ -2642,12 +2728,15 @@ static struct vimoption options[] = {"tagstack", "tgst", P_BOOL|P_VI_DEF, (char_u *)&p_tgst, PV_NONE, {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, -#if defined(DYNAMIC_TCL) {"tcldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, +#if defined(DYNAMIC_TCL) (char_u *)&p_tcldll, PV_NONE, {(char_u *)DYNAMIC_TCL_DLL, (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif + SCRIPTID_INIT}, {"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL, (char_u *)&T_NAME, PV_NONE, {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, @@ -2742,17 +2831,24 @@ static struct vimoption options[] = (char_u *)NULL, PV_NONE, #endif {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, -#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) {"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP, +#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) (char_u *)&p_toolbar, PV_NONE, {(char_u *)"icons,tooltips", (char_u *)0L} - SCRIPTID_INIT}, +#else + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif -#if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) + SCRIPTID_INIT}, {"toolbariconsize", "tbis", P_STRING|P_VI_DEF, +#if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) (char_u *)&p_tbis, PV_NONE, - {(char_u *)"small", (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)"small", (char_u *)0L} +#else + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif + SCRIPTID_INIT}, {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM, (char_u *)&p_ttimeout, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, diff --git a/src/testdir/test_expand_dllpath.vim b/src/testdir/test_expand_dllpath.vim index d8ab41668..b3e099a45 100644 --- a/src/testdir/test_expand_dllpath.vim +++ b/src/testdir/test_expand_dllpath.vim @@ -14,7 +14,7 @@ func s:test_expand_dllpath(optname) endfunc func s:generate_test_if_exists(optname) - if exists('&' . a:optname) + if exists('+' . a:optname) execute join([ \ 'func Test_expand_' . a:optname . '()', \ ' call s:test_expand_dllpath("' . a:optname . '")', diff --git a/src/version.c b/src/version.c index d8940c7df..3b8c12705 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 372, +/**/ 371, /**/ 370, |