mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor(optionstr.c): break up did_set_string_option 31
This commit is contained in:
parent
59746d228e
commit
0522dc35af
@ -704,6 +704,13 @@ static void did_set_helplang(char **errmsg)
|
||||
}
|
||||
}
|
||||
|
||||
static void did_set_highlight(char **varp, char **errmsg)
|
||||
{
|
||||
if (strcmp(*varp, HIGHLIGHT_INIT) != 0) {
|
||||
*errmsg = e_unsupportedoption;
|
||||
}
|
||||
}
|
||||
|
||||
static void did_set_background(char **errmsg)
|
||||
{
|
||||
if (check_opt_strings(p_bg, p_bg_values, false) != OK) {
|
||||
@ -1383,9 +1390,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf
|
||||
} else if (varp == &p_hlg) { // 'helplang'
|
||||
did_set_helplang(&errmsg);
|
||||
} else if (varp == &p_hl) { // 'highlight'
|
||||
if (strcmp(*varp, HIGHLIGHT_INIT) != 0) {
|
||||
errmsg = e_unsupportedoption;
|
||||
}
|
||||
did_set_highlight(varp, &errmsg);
|
||||
} else if (varp == &p_jop) { // 'jumpoptions'
|
||||
if (opt_strings_flags(p_jop, p_jop_values, &jop_flags, true) != OK) {
|
||||
errmsg = e_invarg;
|
||||
|
Loading…
Reference in New Issue
Block a user