mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.0369: a few options are not defined, depending on features
Problem: The 'balloondelay', 'ballooneval' and 'balloonexpr' options are not defined without the +balloon_eval feature. Testing that an option value fails does not work for unsupported options. Solution: Make the options defined but not supported. Don't test if setting unsupported options fails.
This commit is contained in:
@@ -27,8 +27,8 @@ let test_values = {
|
|||||||
\ 'foldcolumn': [[0, 1, 4, 12], [-1, 13, 999]],
|
\ 'foldcolumn': [[0, 1, 4, 12], [-1, 13, 999]],
|
||||||
\ 'helpheight': [[0, 10, 100], [-1]],
|
\ 'helpheight': [[0, 10, 100], [-1]],
|
||||||
\ 'history': [[0, 1, 100], [-1, 10001]],
|
\ 'history': [[0, 1, 100], [-1, 10001]],
|
||||||
\ 'iminsert': [[0, 1, 2], [-1, 3, 999]],
|
\ 'iminsert': [[0, 1], [-1, 3, 999]],
|
||||||
\ 'imsearch': [[-1, 0, 1, 2], [-2, 3, 999]],
|
\ 'imsearch': [[-1, 0, 1], [-2, 3, 999]],
|
||||||
\ 'lines': [[2, 24], [-1, 0, 1]],
|
\ 'lines': [[2, 24], [-1, 0, 1]],
|
||||||
\ 'numberwidth': [[1, 4, 8, 10], [-1, 0, 11]],
|
\ 'numberwidth': [[1, 4, 8, 10], [-1, 0, 11]],
|
||||||
\ 'regexpengine': [[0, 1, 2], [-1, 3, 999]],
|
\ 'regexpengine': [[0, 1, 2], [-1, 3, 999]],
|
||||||
@@ -170,10 +170,14 @@ while 1
|
|||||||
call add(script, 'set ' . name . '=' . val)
|
call add(script, 'set ' . name . '=' . val)
|
||||||
call add(script, 'set ' . shortname . '=' . val)
|
call add(script, 'set ' . shortname . '=' . val)
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
" setting an option can only fail when it's implemented.
|
||||||
|
call add(script, "if exists('+" . name . "')")
|
||||||
for val in a[1]
|
for val in a[1]
|
||||||
call add(script, "call assert_fails('set " . name . "=" . val . "')")
|
call add(script, "call assert_fails('set " . name . "=" . val . "')")
|
||||||
call add(script, "call assert_fails('set " . shortname . "=" . val . "')")
|
call add(script, "call assert_fails('set " . shortname . "=" . val . "')")
|
||||||
endfor
|
endfor
|
||||||
|
call add(script, "endif")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call add(script, 'set ' . name . '&')
|
call add(script, 'set ' . name . '&')
|
||||||
|
34
src/option.c
34
src/option.c
@@ -624,19 +624,33 @@ static struct vimoption options[] =
|
|||||||
{(char_u *)0L, (char_u *)0L}
|
{(char_u *)0L, (char_u *)0L}
|
||||||
#endif
|
#endif
|
||||||
SCRIPTID_INIT},
|
SCRIPTID_INIT},
|
||||||
#ifdef FEAT_BEVAL
|
|
||||||
{"balloondelay","bdlay",P_NUM|P_VI_DEF,
|
{"balloondelay","bdlay",P_NUM|P_VI_DEF,
|
||||||
|
#ifdef FEAT_BEVAL
|
||||||
(char_u *)&p_bdlay, PV_NONE,
|
(char_u *)&p_bdlay, PV_NONE,
|
||||||
{(char_u *)600L, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)600L, (char_u *)0L}
|
||||||
{"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC,
|
#else
|
||||||
(char_u *)&p_beval, PV_NONE,
|
(char_u *)NULL, PV_NONE,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)0L, (char_u *)0L}
|
||||||
# ifdef FEAT_EVAL
|
|
||||||
{"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
|
|
||||||
(char_u *)&p_bexpr, PV_BEXPR,
|
|
||||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
SCRIPTID_INIT},
|
||||||
|
{"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC,
|
||||||
|
#ifdef FEAT_BEVAL
|
||||||
|
(char_u *)&p_beval, PV_NONE,
|
||||||
|
{(char_u *)FALSE, (char_u *)0L}
|
||||||
|
#else
|
||||||
|
(char_u *)NULL, PV_NONE,
|
||||||
|
{(char_u *)0L, (char_u *)0L}
|
||||||
|
#endif
|
||||||
|
SCRIPTID_INIT},
|
||||||
|
{"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
|
||||||
|
#if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
|
||||||
|
(char_u *)&p_bexpr, PV_BEXPR,
|
||||||
|
{(char_u *)"", (char_u *)0L}
|
||||||
|
#else
|
||||||
|
(char_u *)NULL, PV_NONE,
|
||||||
|
{(char_u *)0L, (char_u *)0L}
|
||||||
|
#endif
|
||||||
|
SCRIPTID_INIT},
|
||||||
{"beautify", "bf", P_BOOL|P_VI_DEF,
|
{"beautify", "bf", P_BOOL|P_VI_DEF,
|
||||||
(char_u *)NULL, PV_NONE,
|
(char_u *)NULL, PV_NONE,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
369,
|
||||||
/**/
|
/**/
|
||||||
368,
|
368,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user