Mercurial > vim
changeset 10414:dfad15fabd54 v8.0.0101
commit https://github.com/vim/vim/commit/031cb743ae154cfb727a9b7787bdcb61202ff1c8
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 24 21:46:19 2016 +0100
patch 8.0.0101
Problem: Some options are not strictly checked.
Solution: Add flags for strickter checks.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 24 Nov 2016 22:00:04 +0100 |
parents | 2949297fdea9 |
children | 660440b1adcf |
files | src/option.c src/version.c |
diffstat | 2 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -992,7 +992,7 @@ static struct vimoption options[] = (char_u *)NULL, PV_NONE, #endif {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, - {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP, + {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NFNAME, #ifdef FEAT_INS_EXPAND (char_u *)&p_dict, PV_DICT, #else @@ -2058,7 +2058,7 @@ static struct vimoption options[] = {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, - {"printexpr", "pexpr", P_STRING|P_VI_DEF, + {"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE, #ifdef FEAT_POSTSCRIPT (char_u *)&p_pexpr, PV_NONE, {(char_u *)"", (char_u *)0L} @@ -7021,6 +7021,7 @@ did_set_string_option( #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) + /* 'toolbar' */ else if (varp == &p_toolbar) { if (opt_strings_flags(p_toolbar, p_toolbar_values, @@ -7235,6 +7236,7 @@ did_set_string_option( #endif #if defined(FEAT_RENDER_OPTIONS) + /* 'renderoptions' */ else if (varp == &p_rop && gui.in_use) { if (!gui_mch_set_rendering_options(p_rop)) @@ -7262,19 +7264,19 @@ did_set_string_option( else { p = NULL; - if (varp == &p_ww) + if (varp == &p_ww) /* 'whichwrap' */ p = (char_u *)WW_ALL; - if (varp == &p_shm) + if (varp == &p_shm) /* 'shortmess' */ p = (char_u *)SHM_ALL; - else if (varp == &(p_cpo)) + else if (varp == &(p_cpo)) /* 'cpoptions' */ p = (char_u *)CPO_ALL; - else if (varp == &(curbuf->b_p_fo)) + else if (varp == &(curbuf->b_p_fo)) /* 'formatoptions' */ p = (char_u *)FO_ALL; #ifdef FEAT_CONCEAL - else if (varp == &curwin->w_p_cocu) + else if (varp == &curwin->w_p_cocu) /* 'concealcursor' */ p = (char_u *)COCU_ALL; #endif - else if (varp == &p_mouse) + else if (varp == &p_mouse) /* 'mouse' */ { #ifdef FEAT_MOUSE p = (char_u *)MOUSE_ALL; @@ -7284,7 +7286,7 @@ did_set_string_option( #endif } #if defined(FEAT_GUI) - else if (varp == &p_go) + else if (varp == &p_go) /* 'guioptions' */ p = (char_u *)GO_ALL; #endif if (p != NULL)