mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.0647: the 'splitscroll' option is not a good name
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
6b2d4ff714
commit
13ece2ae1d
@@ -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);
|
||||
|
Reference in New Issue
Block a user