diff options
author | Famiu Haque <famiuhaque@proton.me> | 2023-12-22 12:24:20 +0600 |
---|---|---|
committer | Famiu Haque <famiuhaque@proton.me> | 2023-12-23 11:09:00 +0600 |
commit | 8f72987837ce15156704f54951224de4ae36741d (patch) | |
tree | b03e444fc105dd79e3f5ffe1daecfbffdd9ab81d /src | |
parent | 4d98ec2fa45a100292c490acc606dfb55a0573c1 (diff) | |
download | rneovim-8f72987837ce15156704f54951224de4ae36741d.tar.gz rneovim-8f72987837ce15156704f54951224de4ae36741d.tar.bz2 rneovim-8f72987837ce15156704f54951224de4ae36741d.zip |
refactor(options): use `OptIndex` for `os_idx`
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/option_defs.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index 72fb5a92fc..c1b9b8d196 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -8,6 +8,10 @@ #include "nvim/regexp_defs.h" #include "nvim/types_defs.h" +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "options_enum.generated.h" +#endif + /// Option value type. /// These types are also used as type flags by using the type value as an index for the type_flags /// bit field (@see option_has_type()). @@ -50,10 +54,11 @@ typedef struct { /// Pointer to the option variable. The variable can be an OptInt (numeric /// option), an int (boolean option) or a char pointer (string option). void *os_varp; - int os_idx; + OptIndex os_idx; int os_flags; /// Old value of the option. + /// TODO(famiu): Convert `os_oldval` and `os_newval` to `OptVal` to accomodate multitype options. OptValData os_oldval; /// New value of the option. OptValData os_newval; @@ -129,7 +134,3 @@ typedef enum { kOptReqWin = 1, ///< Request window-local option value kOptReqBuf = 2, ///< Request buffer-local option value } OptReqScope; - -#ifdef INCLUDE_GENERATED_DECLARATIONS -# include "options_enum.generated.h" -#endif |