aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-01-17 14:17:40 +0100
committerGitHub <noreply@github.com>2023-01-17 21:17:40 +0800
commit0344bfad0fc87d2e256ea2b80de7abd069ba1dd2 (patch)
treee42d0318ed1e684bbb468661d8a1fbfe82e819ee /src/nvim/ex_cmds.c
parent99186508d9a1b7536441112f9bbe48690592b5d7 (diff)
downloadrneovim-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/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index c2af0e6986..4ea11dd32a 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -528,7 +528,7 @@ void ex_sort(exarg_T *eap)
emsg(_(e_noprevre));
goto sortend;
}
- regmatch.regprog = vim_regcomp((char *)last_search_pat(), RE_MAGIC);
+ regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
} else {
regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC);
}
@@ -3332,7 +3332,7 @@ static int do_sub(exarg_T *eap, proftime_T timeout, long cmdpreview_ns, handle_T
}
// new pattern and substitution
if (eap->cmd[0] == 's' && *cmd != NUL && !ascii_iswhite(*cmd)
- && vim_strchr("0123456789cegriIp|\"", *cmd) == NULL) {
+ && vim_strchr("0123456789cegriIp|\"", (uint8_t)(*cmd)) == NULL) {
// don't accept alphanumeric for separator
if (check_regexp_delim(*cmd) == FAIL) {
return 0;
@@ -3343,7 +3343,7 @@ static int do_sub(exarg_T *eap, proftime_T timeout, long cmdpreview_ns, handle_T
// //sub/r). "\&sub&" use last substitute pattern (like //sub/).
if (*cmd == '\\') {
cmd++;
- if (vim_strchr("/?&", *cmd) == NULL) {
+ if (vim_strchr("/?&", (uint8_t)(*cmd)) == NULL) {
emsg(_(e_backslash));
return 0;
}
@@ -3443,7 +3443,7 @@ static int do_sub(exarg_T *eap, proftime_T timeout, long cmdpreview_ns, handle_T
return 0;
}
- if (search_regcomp((char_u *)pat, NULL, RE_SUBST, which_pat,
+ if (search_regcomp(pat, NULL, RE_SUBST, which_pat,
(cmdpreview ? 0 : SEARCH_HIS), &regmatch) == FAIL) {
if (subflags.do_error) {
emsg(_(e_invcmd));
@@ -4372,7 +4372,7 @@ void ex_global(exarg_T *eap)
// "\&": use previous substitute pattern.
if (*cmd == '\\') {
cmd++;
- if (vim_strchr("/?&", *cmd) == NULL) {
+ if (vim_strchr("/?&", (uint8_t)(*cmd)) == NULL) {
emsg(_(e_backslash));
return;
}
@@ -4398,8 +4398,8 @@ void ex_global(exarg_T *eap)
}
}
- char_u *used_pat;
- if (search_regcomp((char_u *)pat, &used_pat, RE_BOTH, which_pat,
+ char *used_pat;
+ if (search_regcomp(pat, &used_pat, RE_BOTH, which_pat,
SEARCH_HIS, &regmatch) == FAIL) {
emsg(_(e_invcmd));
return;