1
0
forked from aniani/vim

patch 8.1.0166: using dict_add_nr_str() is clumsy

Problem:    Using dict_add_nr_str() is clumsy.
Solution:   Split into two functions. (Ozaki Kiichi, closes #3154)
This commit is contained in:
Bram Moolenaar
2018-07-08 16:50:37 +02:00
parent 4cde86c2ef
commit e0be167a80
13 changed files with 187 additions and 197 deletions

View File

@@ -13222,11 +13222,11 @@ get_winbuf_options(int bufopt)
if (varp != NULL)
{
if (opt->flags & P_STRING)
dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp);
dict_add_string(d, opt->fullname, *(char_u **)varp);
else if (opt->flags & P_NUM)
dict_add_nr_str(d, opt->fullname, *(long *)varp, NULL);
dict_add_number(d, opt->fullname, *(long *)varp);
else
dict_add_nr_str(d, opt->fullname, *(int *)varp, NULL);
dict_add_number(d, opt->fullname, *(int *)varp);
}
}
}