mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
refactor(optionstr.c): break up did_set_string_option 33
This commit is contained in:
@@ -718,6 +718,13 @@ static void did_set_jumpoptions(char **errmsg)
|
||||
}
|
||||
}
|
||||
|
||||
static void did_set_nrformats(char **varp, char **errmsg)
|
||||
{
|
||||
if (check_opt_strings(*varp, p_nf_values, true) != OK) {
|
||||
*errmsg = e_invarg;
|
||||
}
|
||||
}
|
||||
|
||||
static void did_set_background(char **errmsg)
|
||||
{
|
||||
if (check_opt_strings(p_bg, p_bg_values, false) != OK) {
|
||||
@@ -1401,9 +1408,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
|
||||
} else if (varp == &p_jop) { // 'jumpoptions'
|
||||
did_set_jumpoptions(&errmsg);
|
||||
} else if (gvarp == &p_nf) { // 'nrformats'
|
||||
if (check_opt_strings(*varp, p_nf_values, true) != OK) {
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
did_set_nrformats(varp, &errmsg);
|
||||
} else if (varp == &p_ssop) { // 'sessionoptions'
|
||||
if (opt_strings_flags(p_ssop, p_ssop_values, &ssop_flags, true) != OK) {
|
||||
errmsg = e_invarg;
|
||||
|
Reference in New Issue
Block a user