From 07db909eb5ae2a559771068be64439eba394cd61 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 20 Nov 2024 23:50:30 +0100 Subject: docs: misc (#31138) Co-authored-by: zeertzjq --- src/nvim/mbyte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/mbyte.c') diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 65f718f925..b5a8588edd 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -1119,7 +1119,7 @@ int utf_char2bytes(const int c, char *const buf) /// stateful algorithm to determine grapheme clusters. Still available /// to support some legacy code which hasn't been refactored yet. /// -/// To check if a char would combine with a preceeding space, use +/// To check if a char would combine with a preceding space, use /// utf_iscomposing_first() instead. /// /// Based on code from Markus Kuhn. -- cgit From 8516c2dc1f301c439695629fff771227dbe00d30 Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Sat, 23 Nov 2024 14:22:06 +0600 Subject: 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 --- src/nvim/mbyte.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/mbyte.c') 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); } -- cgit From 2a7d0ed6145bf3f8b139c2694563f460f829813a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 23 Dec 2024 05:43:52 -0800 Subject: refactor: iwyu #31637 Result of `make iwyu` (after some "fixups"). --- src/nvim/mbyte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/mbyte.c') diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 3e35cdaa15..ffd4472b8a 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -51,7 +52,6 @@ #include "nvim/gettext_defs.h" #include "nvim/globals.h" #include "nvim/grid.h" -#include "nvim/grid_defs.h" #include "nvim/iconv_defs.h" #include "nvim/keycodes.h" #include "nvim/macros_defs.h" -- cgit