aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option_defs.h
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-12-28 14:55:22 +0600
committerLewis Russell <me@lewisr.dev>2025-01-14 09:34:17 +0000
commitc5f93d7ab04f93db1470d58ca1f70e947e716c2b (patch)
tree27c460ef4b486f91efdb8d89bb0d731c81239273 /src/nvim/option_defs.h
parentb192d58284a791c55f5ae000250fc948e9098d47 (diff)
downloadrneovim-c5f93d7ab04f93db1470d58ca1f70e947e716c2b.tar.gz
rneovim-c5f93d7ab04f93db1470d58ca1f70e947e716c2b.tar.bz2
rneovim-c5f93d7ab04f93db1470d58ca1f70e947e716c2b.zip
refactor(options): remove code for multitype options
Problem: It was decided on Matrix chat that multitype options won't be necessary for Neovim options, and that options should only have a single canonical type. Therefore the code for supporting multitype options is unnecessary. Solution: Remove the additional code that's used to provide multitype option support.
Diffstat (limited to 'src/nvim/option_defs.h')
-rw-r--r--src/nvim/option_defs.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index 832e03148a..2b51547004 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -54,9 +54,6 @@ typedef enum {
kOptValTypeNumber,
kOptValTypeString,
} OptValType;
-/// Always update this whenever a new option type is added.
-#define kOptValTypeSize (kOptValTypeString + 1)
-typedef uint32_t OptTypeFlags;
/// Scopes that an option can support.
typedef enum {
@@ -99,7 +96,6 @@ typedef struct {
int os_flags;
/// Old value of the option.
- /// TODO(famiu): Convert `os_oldval` and `os_newval` to `OptVal` to accommodate multitype options.
OptValData os_oldval;
/// New value of the option.
OptValData os_newval;
@@ -173,7 +169,7 @@ typedef struct {
char *fullname; ///< full option name
char *shortname; ///< permissible abbreviation
uint32_t flags; ///< see above
- OptTypeFlags type_flags; ///< option type flags, see OptValType
+ OptValType type; ///< option type
OptScopeFlags scope_flags; ///< option scope flags, see OptScope
void *var; ///< global option: pointer to variable;
///< window-local option: NULL;