diff options
Diffstat (limited to 'src/optionstr.c')
-rw-r--r-- | src/optionstr.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/optionstr.c b/src/optionstr.c index 417f785907..b6249a2f38 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -81,6 +81,8 @@ static char *(p_ssop_values[]) = {"buffers", "winpos", "resize", "winsize", static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", "vsplit", "uselast", NULL}; static char *(p_spk_values[]) = {"cursor", "screen", "topline", NULL}; static char *(p_tc_values[]) = {"followic", "ignore", "match", "followscs", "smart", NULL}; +// Keep in sync with TCL_ flags in option.h +static char *(p_tcl_values[]) = {"left", "uselast", NULL}; #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) static char *(p_toolbar_values[]) = {"text", "icons", "tooltips", "horiz", NULL}; #endif @@ -166,6 +168,7 @@ didset_string_options(void) (void)opt_strings_flags(p_tbis, p_tbis_values, &tbis_flags, FALSE); #endif (void)opt_strings_flags(p_swb, p_swb_values, &swb_flags, TRUE); + (void)opt_strings_flags(p_tcl, p_tcl_values, &tcl_flags, TRUE); } #if defined(FEAT_EVAL) || defined(PROTO) @@ -3669,6 +3672,26 @@ expand_set_switchbuf(optexpand_T *args, int *numMatches, char_u ***matches) matches); } +/* + * The 'tabclose' option is changed. + */ + char * +did_set_tabclose(optset_T *args UNUSED) +{ + return did_set_opt_flags(p_tcl, p_tcl_values, &tcl_flags, TRUE); +} + + int +expand_set_tabclose(optexpand_T *args, int *numMatches, char_u ***matches) +{ + return expand_set_opt_string( + args, + p_tcl_values, + ARRAY_LENGTH(p_tcl_values) - 1, + numMatches, + matches); +} + #if defined(FEAT_STL_OPT) || defined(PROTO) /* * The 'tabline' option is changed. |