Skip to content

Commit 031cb74

Browse files
committed
patch 8.0.0101
Problem: Some options are not strictly checked. Solution: Add flags for strickter checks.
1 parent 319afe3 commit 031cb74

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/option.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ static struct vimoption options[] =
992992
(char_u *)NULL, PV_NONE,
993993
#endif
994994
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
995-
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
995+
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NFNAME,
996996
#ifdef FEAT_INS_EXPAND
997997
(char_u *)&p_dict, PV_DICT,
998998
#else
@@ -2058,7 +2058,7 @@ static struct vimoption options[] =
20582058
{(char_u *)NULL, (char_u *)0L}
20592059
#endif
20602060
SCRIPTID_INIT},
2061-
{"printexpr", "pexpr", P_STRING|P_VI_DEF,
2061+
{"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE,
20622062
#ifdef FEAT_POSTSCRIPT
20632063
(char_u *)&p_pexpr, PV_NONE,
20642064
{(char_u *)"", (char_u *)0L}
@@ -7021,6 +7021,7 @@ did_set_string_option(
70217021

70227022

70237023
#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
7024+
/* 'toolbar' */
70247025
else if (varp == &p_toolbar)
70257026
{
70267027
if (opt_strings_flags(p_toolbar, p_toolbar_values,
@@ -7235,6 +7236,7 @@ did_set_string_option(
72357236
#endif
72367237

72377238
#if defined(FEAT_RENDER_OPTIONS)
7239+
/* 'renderoptions' */
72387240
else if (varp == &p_rop && gui.in_use)
72397241
{
72407242
if (!gui_mch_set_rendering_options(p_rop))
@@ -7262,19 +7264,19 @@ did_set_string_option(
72627264
else
72637265
{
72647266
p = NULL;
7265-
if (varp == &p_ww)
7267+
if (varp == &p_ww) /* 'whichwrap' */
72667268
p = (char_u *)WW_ALL;
7267-
if (varp == &p_shm)
7269+
if (varp == &p_shm) /* 'shortmess' */
72687270
p = (char_u *)SHM_ALL;
7269-
else if (varp == &(p_cpo))
7271+
else if (varp == &(p_cpo)) /* 'cpoptions' */
72707272
p = (char_u *)CPO_ALL;
7271-
else if (varp == &(curbuf->b_p_fo))
7273+
else if (varp == &(curbuf->b_p_fo)) /* 'formatoptions' */
72727274
p = (char_u *)FO_ALL;
72737275
#ifdef FEAT_CONCEAL
7274-
else if (varp == &curwin->w_p_cocu)
7276+
else if (varp == &curwin->w_p_cocu) /* 'concealcursor' */
72757277
p = (char_u *)COCU_ALL;
72767278
#endif
7277-
else if (varp == &p_mouse)
7279+
else if (varp == &p_mouse) /* 'mouse' */
72787280
{
72797281
#ifdef FEAT_MOUSE
72807282
p = (char_u *)MOUSE_ALL;
@@ -7284,7 +7286,7 @@ did_set_string_option(
72847286
#endif
72857287
}
72867288
#if defined(FEAT_GUI)
7287-
else if (varp == &p_go)
7289+
else if (varp == &p_go) /* 'guioptions' */
72887290
p = (char_u *)GO_ALL;
72897291
#endif
72907292
if (p != NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
101,
767769
/**/
768770
100,
769771
/**/

0 commit comments

Comments
 (0)