patch 9.0.1275: the code for setting options is too complicated

Problem:    The code for setting options is too complicated.
Solution:   Refactor the do_set() function. (Yegappan Lakshmanan, Lewis
            Russell, closes #11932)
This commit is contained in:
Yegappan Lakshmanan 2023-02-02 16:34:11 +00:00 committed by Bram Moolenaar
parent be4e01637e
commit 78012f55fa
3 changed files with 521 additions and 484 deletions

File diff suppressed because it is too large Load Diff

View File

@ -680,7 +680,8 @@ did_set_term(int *opt_idx, long_u *free_oldval)
// Both 'term' and 'ttytype' point to T_NAME, only set the
// P_ALLOCED flag on 'term'.
*opt_idx = findoption((char_u *)"term");
*free_oldval = (get_option_flags(*opt_idx) & P_ALLOCED);
if (*opt_idx >= 0)
*free_oldval = (get_option_flags(*opt_idx) & P_ALLOCED);
}
return errmsg;

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1275,
/**/
1274,
/**/