diff src/option.c @ 10960:d7b78cbf85e4 v8.0.0369

patch 8.0.0369: a few options are not defined, depending on features commit https://github.com/vim/vim/commit/c43a8b8de0676caf8a460b6af1310d7aba8221bb Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 25 21:12:29 2017 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Feb 2017 21:15:03 +0100
parents 32b299ae6752
children 6da4287fd735
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -624,19 +624,33 @@ static struct vimoption options[] =
 			    {(char_u *)0L, (char_u *)0L}
 #endif
 			    SCRIPTID_INIT},
+    {"balloondelay","bdlay",P_NUM|P_VI_DEF,
 #ifdef FEAT_BEVAL
-    {"balloondelay","bdlay",P_NUM|P_VI_DEF,
 			    (char_u *)&p_bdlay, PV_NONE,
-			    {(char_u *)600L, (char_u *)0L} SCRIPTID_INIT},
+			    {(char_u *)600L, (char_u *)0L}
+#else
+			    (char_u *)NULL, PV_NONE,
+			    {(char_u *)0L, (char_u *)0L}
+#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} SCRIPTID_INIT},
-# ifdef FEAT_EVAL
+			    {(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} SCRIPTID_INIT},
-# endif
-#endif
+			    {(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,
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},