mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
refactor(options): remove os_op
This commit is contained in:
parent
5df4fdf253
commit
36e4901cbd
@ -1173,8 +1173,7 @@ static void do_set_option_string(int opt_idx, int opt_flags, char **argp, int ne
|
|||||||
// 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(curbuf, curwin, opt_idx, (char **)varp, oldval,
|
*errmsg = did_set_string_option(curbuf, curwin, opt_idx, (char **)varp, oldval,
|
||||||
errbuf, errbuflen,
|
errbuf, errbuflen, opt_flags, value_checked);
|
||||||
opt_flags, op, value_checked);
|
|
||||||
|
|
||||||
secure = secure_saved;
|
secure = secure_saved;
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ typedef struct {
|
|||||||
void *os_varp;
|
void *os_varp;
|
||||||
int os_idx;
|
int os_idx;
|
||||||
int os_flags;
|
int os_flags;
|
||||||
set_op_T os_op;
|
|
||||||
|
|
||||||
/// old value of the option (can be a string, number or a boolean)
|
/// old value of the option (can be a string, number or a boolean)
|
||||||
union {
|
union {
|
||||||
|
@ -503,8 +503,7 @@ const char *set_string_option(const int opt_idx, void *varp, const char *value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *const errmsg = did_set_string_option(curbuf, curwin, opt_idx, varp, oldval,
|
const char *const errmsg = did_set_string_option(curbuf, curwin, opt_idx, varp, oldval,
|
||||||
errbuf, errbuflen,
|
errbuf, errbuflen, opt_flags, value_checked);
|
||||||
opt_flags, OP_NONE, value_checked);
|
|
||||||
|
|
||||||
secure = secure_saved;
|
secure = secure_saved;
|
||||||
|
|
||||||
@ -2741,7 +2740,7 @@ static void do_spelllang_source(win_T *win)
|
|||||||
///
|
///
|
||||||
/// @return NULL for success, or an untranslated error message for an error
|
/// @return NULL for success, or an untranslated error message for an error
|
||||||
const char *did_set_string_option(buf_T *buf, win_T *win, int opt_idx, char **varp, char *oldval,
|
const char *did_set_string_option(buf_T *buf, win_T *win, int opt_idx, char **varp, char *oldval,
|
||||||
char *errbuf, size_t errbuflen, int opt_flags, set_op_T op,
|
char *errbuf, size_t errbuflen, int opt_flags,
|
||||||
bool *value_checked)
|
bool *value_checked)
|
||||||
{
|
{
|
||||||
const char *errmsg = NULL;
|
const char *errmsg = NULL;
|
||||||
@ -2755,7 +2754,6 @@ const char *did_set_string_option(buf_T *buf, win_T *win, int opt_idx, char **va
|
|||||||
.os_varp = varp,
|
.os_varp = varp,
|
||||||
.os_idx = opt_idx,
|
.os_idx = opt_idx,
|
||||||
.os_flags = opt_flags,
|
.os_flags = opt_flags,
|
||||||
.os_op = op,
|
|
||||||
.os_oldval.string = oldval,
|
.os_oldval.string = oldval,
|
||||||
.os_newval.string = *varp,
|
.os_newval.string = *varp,
|
||||||
.os_value_checked = false,
|
.os_value_checked = false,
|
||||||
|
Loading…
Reference in New Issue
Block a user