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.
This commit is contained in:
Famiu Haque
2024-12-28 14:55:22 +06:00
committed by Lewis Russell
parent b192d58284
commit c5f93d7ab0
4 changed files with 11 additions and 88 deletions

View File

@@ -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;