mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor(option.c): remove did_set_string_option alias
This commit is contained in:
parent
4b0b798eba
commit
3b02e1281a
@ -1172,7 +1172,7 @@ static void do_set_option_string(int opt_idx, int opt_flags, char **argp, int ne
|
|||||||
// Handle side effects, and set the global value for ":set" on local
|
// Handle side effects, and set the global value for ":set" on local
|
||||||
// options. Note: when setting 'syntax' or 'filetype' autocommands may
|
// options. Note: when setting 'syntax' or 'filetype' autocommands may
|
||||||
// be triggered that can cause havoc.
|
// be triggered that can cause havoc.
|
||||||
*errmsg = did_set_string_option(opt_idx, (char **)varp, oldval, newval,
|
*errmsg = did_set_string_option(curbuf, curwin, opt_idx, (char **)varp, oldval, newval,
|
||||||
errbuf, errbuflen,
|
errbuf, errbuflen,
|
||||||
opt_flags, value_checked);
|
opt_flags, value_checked);
|
||||||
|
|
||||||
|
@ -459,8 +459,8 @@ const char *set_string_option(const int opt_idx, const char *const value, const
|
|||||||
char *const saved_newval = xstrdup(s);
|
char *const saved_newval = xstrdup(s);
|
||||||
|
|
||||||
int value_checked = false;
|
int value_checked = false;
|
||||||
const char *const errmsg = did_set_string_option(opt_idx, varp, oldval, s, errbuf, errbuflen,
|
const char *const errmsg = did_set_string_option(curbuf, curwin, opt_idx, varp, oldval, s, errbuf,
|
||||||
opt_flags, &value_checked);
|
errbuflen, opt_flags, &value_checked);
|
||||||
if (errmsg == NULL) {
|
if (errmsg == NULL) {
|
||||||
did_set_option(opt_idx, opt_flags, true, value_checked);
|
did_set_option(opt_idx, opt_flags, true, value_checked);
|
||||||
}
|
}
|
||||||
@ -2066,9 +2066,9 @@ static void do_spelllang_source(win_T *win)
|
|||||||
/// @param value_checked value was checked to be safe, no need to set P_INSECURE
|
/// @param value_checked value was checked to be safe, no need to set P_INSECURE
|
||||||
///
|
///
|
||||||
/// @return NULL for success, or an untranslated error message for an error
|
/// @return NULL for success, or an untranslated error message for an error
|
||||||
static const char *did_set_string_option_for(buf_T *buf, win_T *win, int opt_idx, char **varp,
|
const char *did_set_string_option(buf_T *buf, win_T *win, int opt_idx, char **varp, char *oldval,
|
||||||
char *oldval, const char *value, char *errbuf,
|
const char *value, char *errbuf, size_t errbuflen, int opt_flags,
|
||||||
size_t errbuflen, int opt_flags, int *value_checked)
|
int *value_checked)
|
||||||
{
|
{
|
||||||
const char *errmsg = NULL;
|
const char *errmsg = NULL;
|
||||||
int restore_chartab = false;
|
int restore_chartab = false;
|
||||||
@ -2186,13 +2186,6 @@ static const char *did_set_string_option_for(buf_T *buf, win_T *win, int opt_idx
|
|||||||
return errmsg;
|
return errmsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *value, char *errbuf,
|
|
||||||
size_t errbuflen, int opt_flags, int *value_checked)
|
|
||||||
{
|
|
||||||
return did_set_string_option_for(curbuf, curwin, opt_idx, varp, oldval, value, errbuf,
|
|
||||||
errbuflen, opt_flags, value_checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Check an option that can be a range of string values.
|
/// Check an option that can be a range of string values.
|
||||||
///
|
///
|
||||||
/// @param list when true: accept a list of values
|
/// @param list when true: accept a list of values
|
||||||
|
Loading…
Reference in New Issue
Block a user