From 36e4901cbdb1c2b4b1d88cf9a7da157bf725fae4 Mon Sep 17 00:00:00 2001
From: Famiu Haque <famiuhaque@proton.me>
Date: Wed, 11 Oct 2023 18:03:22 +0600
Subject: [PATCH] refactor(options): remove `os_op`

---
 src/nvim/option.c      | 3 +--
 src/nvim/option_defs.h | 1 -
 src/nvim/optionstr.c   | 6 ++----
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/nvim/option.c b/src/nvim/option.c
index b6964481e9..9426d3924a 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -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;
 
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index a11ed9188c..7d5cf3aabe 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -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 {
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 9a499c56fb..4aa51db3f1 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -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,