1
0
forked from aniani/vim

patch 7.4.786

Problem:    It is not possible for a plugin to adjust to a changed setting.
Solution:   Add the OptionSet autocommand event. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2015-07-17 17:38:22 +02:00
parent 34d72d4b6c
commit 537443018d
16 changed files with 354 additions and 5 deletions

View File

@@ -365,6 +365,9 @@ static struct vimvar
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
{VV_NAME("progpath", VAR_STRING), VV_RO},
{VV_NAME("completed_item", VAR_DICT), VV_RO},
{VV_NAME("option_new", VAR_STRING), VV_RO},
{VV_NAME("option_old", VAR_STRING), VV_RO},
{VV_NAME("option_type", VAR_STRING), VV_RO},
};
/* shorthand */
@@ -24720,6 +24723,16 @@ ex_oldfiles(eap)
}
}
/* reset v:option_new, v:option_old and v:option_type */
void
reset_v_option_vars()
{
set_vim_var_string(VV_OPTION_NEW, NULL, -1);
set_vim_var_string(VV_OPTION_OLD, NULL, -1);
set_vim_var_string(VV_OPTION_TYPE, NULL, -1);
}
#endif /* FEAT_EVAL */