diff options
| author | Famiu Haque <famiuhaque@proton.me> | 2024-11-23 14:22:06 +0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-23 08:22:06 +0000 |
| commit | 8516c2dc1f301c439695629fff771227dbe00d30 (patch) | |
| tree | 5e052ad234f99cdbfce89b03ba71796a8cd274ef /src/nvim/mbyte.c | |
| parent | 9a681ad09e2add96d47bf3f39cca8029f3bf09df (diff) | |
| download | rneovim-8516c2dc1f301c439695629fff771227dbe00d30.tar.gz rneovim-8516c2dc1f301c439695629fff771227dbe00d30.tar.bz2 rneovim-8516c2dc1f301c439695629fff771227dbe00d30.zip | |
refactor(options): autogenerate valid values and flag enums for options (#31089)
Problem: Option metadata like list of valid values for an option and
option flags are not listed in the `options.lua` file and are instead
manually defined in C, which means option metadata is split between
several places.
Solution: Put metadata such as list of valid values for an option and
option flags in `options.lua`, and autogenerate the corresponding C
variables and enums.
Supersedes #28659
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'src/nvim/mbyte.c')
| -rw-r--r-- | src/nvim/mbyte.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index b5a8588edd..3e35cdaa15 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -1400,11 +1400,11 @@ int utf_fold(int a) int mb_toupper(int a) { // If 'casemap' contains "keepascii" use ASCII style toupper(). - if (a < 128 && (cmp_flags & CMP_KEEPASCII)) { + if (a < 128 && (cmp_flags & kOptCmpFlagKeepascii)) { return TOUPPER_ASC(a); } - if (!(cmp_flags & CMP_INTERNAL)) { + if (!(cmp_flags & kOptCmpFlagInternal)) { return (int)towupper((wint_t)a); } @@ -1426,11 +1426,11 @@ bool mb_islower(int a) int mb_tolower(int a) { // If 'casemap' contains "keepascii" use ASCII style tolower(). - if (a < 128 && (cmp_flags & CMP_KEEPASCII)) { + if (a < 128 && (cmp_flags & kOptCmpFlagKeepascii)) { return TOLOWER_ASC(a); } - if (!(cmp_flags & CMP_INTERNAL)) { + if (!(cmp_flags & kOptCmpFlagInternal)) { return (int)towlower((wint_t)a); } |