mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
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:

committed by
Lewis Russell

parent
b192d58284
commit
c5f93d7ab0
@@ -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;
|
||||
|
Reference in New Issue
Block a user