refactor(options): remove os_op

This commit is contained in:
Famiu Haque 2023-10-11 18:03:22 +06:00
parent 5df4fdf253
commit 36e4901cbd
3 changed files with 3 additions and 7 deletions

View File

@ -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
// be triggered that can cause havoc.
*errmsg = did_set_string_option(curbuf, curwin, opt_idx, (char **)varp, oldval,
errbuf, errbuflen,
opt_flags, op, value_checked);
errbuf, errbuflen, opt_flags, value_checked);
secure = secure_saved;

View File

@ -45,7 +45,6 @@ typedef struct {
void *os_varp;
int os_idx;
int os_flags;
set_op_T os_op;
/// old value of the option (can be a string, number or a boolean)
union {

View File

@ -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,
errbuf, errbuflen,
opt_flags, OP_NONE, value_checked);
errbuf, errbuflen, opt_flags, value_checked);
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
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)
{
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_idx = opt_idx,
.os_flags = opt_flags,
.os_op = op,
.os_oldval.string = oldval,
.os_newval.string = *varp,
.os_value_checked = false,