diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2022-10-03 15:28:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-03 15:28:08 +0100 |
commit | 13ece2ae1d09009d3fb8acf858c288e7848ecdac (patch) | |
tree | 8c157431840de281782b06d8572adf41085f617e /src/optionstr.c | |
parent | 6b2d4ff7148e0b416ba745d20d061e6f7bb53ee7 (diff) | |
download | vim-git-13ece2ae1d09009d3fb8acf858c288e7848ecdac.tar.gz |
patch 9.0.0647: the 'splitscroll' option is not a good namev9.0.0647
Problem: The 'splitscroll' option is not a good name.
Solution: Rename 'splitscroll' to 'splitkeep' and make it a string option,
also supporting "topline". (Luuk van Baal, closes #11258)
Diffstat (limited to 'src/optionstr.c')
-rw-r--r-- | src/optionstr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/optionstr.c b/src/optionstr.c index 13302efbd..24896cc23 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -46,6 +46,7 @@ static char *(p_ssop_values[]) = {"buffers", "winpos", "resize", "winsize", #endif // Keep in sync with SWB_ flags in option.h 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}; #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) static char *(p_toolbar_values[]) = {"text", "icons", "tooltips", "horiz", NULL}; @@ -1683,6 +1684,13 @@ did_set_string_option( errmsg = e_invalid_argument; } + // 'splitkeep' + else if (varp == &p_spk) + { + if (check_opt_strings(p_spk, p_spk_values, FALSE) != OK) + errmsg = e_invalid_argument; + } + // 'debug' else if (varp == &p_debug) { @@ -1722,7 +1730,7 @@ did_set_string_option( int is_spellfile = varp == &(curwin->w_s->b_p_spf); if ((is_spellfile && !valid_spellfile(*varp)) - || (!is_spellfile && !valid_spelllang(*varp))) + || (!is_spellfile && !valid_spelllang(*varp))) errmsg = e_invalid_argument; else errmsg = did_set_spell_option(is_spellfile); |