diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-17 14:17:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 21:17:40 +0800 |
commit | 0344bfad0fc87d2e256ea2b80de7abd069ba1dd2 (patch) | |
tree | e42d0318ed1e684bbb468661d8a1fbfe82e819ee /src/nvim/optionstr.c | |
parent | 99186508d9a1b7536441112f9bbe48690592b5d7 (diff) | |
download | rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.gz rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.bz2 rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.zip |
refactor: replace char_u with char 22 (#21786)
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index a1a5cadd8d..ab58888482 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -614,7 +614,7 @@ char *check_stl_option(char *s) groupdepth++; continue; } - if (vim_strchr(STL_ALL, *s) == NULL) { + if (vim_strchr(STL_ALL, (uint8_t)(*s)) == NULL) { return illegal_char(errbuf, sizeof(errbuf), *s); } if (*s == '{') { @@ -946,7 +946,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf } else if (gvarp == &p_com) { // 'comments' for (s = *varp; *s;) { while (*s && *s != ':') { - if (vim_strchr(COM_ALL, *s) == NULL + if (vim_strchr(COM_ALL, (uint8_t)(*s)) == NULL && !ascii_isdigit(*s) && *s != '-') { errmsg = illegal_char(errbuf, errbuflen, *s); break; @@ -1016,7 +1016,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf free_oldval = (opt->flags & P_ALLOCED); for (s = p_shada; *s;) { // Check it's a valid character - if (vim_strchr("!\"%'/:<@cfhnrs", *s) == NULL) { + if (vim_strchr("!\"%'/:<@cfhnrs", (uint8_t)(*s)) == NULL) { errmsg = illegal_char(errbuf, errbuflen, *s); break; } @@ -1221,7 +1221,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf if (!*s) { break; } - if (vim_strchr(".wbuksid]tU", *s) == NULL) { + if (vim_strchr(".wbuksid]tU", (uint8_t)(*s)) == NULL) { errmsg = illegal_char(errbuf, errbuflen, *s); break; } @@ -1569,7 +1569,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf } if (p != NULL) { for (s = *varp; *s; s++) { - if (vim_strchr(p, *s) == NULL) { + if (vim_strchr(p, (uint8_t)(*s)) == NULL) { errmsg = illegal_char(errbuf, errbuflen, *s); break; } |