aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-12-21 12:00:05 +0100
committerGitHub <noreply@github.com>2022-12-21 19:00:05 +0800
commitec1738a6ed08dd3a89fd07950fa2dcc55a72b705 (patch)
tree2df3877a3d10926a2fcb17b4e2ff07fd70d03ceb /src/nvim/cmdexpand.c
parentc24605a5a08873d0c7161941b0c7d0aba63d1ccc (diff)
downloadrneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.tar.gz
rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.tar.bz2
rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.zip
refactor: replace char_u with char 16 - remove STRNCMP (#21208)
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index d1a56feef4..c964c96dd7 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -2960,7 +2960,7 @@ int wildmenu_process_key(CmdlineInfo *cclp, int key, expand_T *xp)
if (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_DIRECTORIES
|| xp->xp_context == EXPAND_SHELLCMD) {
- char_u upseg[5];
+ char upseg[5];
upseg[0] = PATHSEP;
upseg[1] = '.';
@@ -2977,7 +2977,7 @@ int wildmenu_process_key(CmdlineInfo *cclp, int key, expand_T *xp)
// go down a directory
c = (int)p_wc;
KeyTyped = true; // in case the key was mapped
- } else if (STRNCMP(xp->xp_pattern, upseg + 1, 3) == 0
+ } else if (strncmp(xp->xp_pattern, upseg + 1, 3) == 0
&& c == K_DOWN) {
// If in a direct ancestor, strip off one ../ to go down
int found = false;
@@ -3024,9 +3024,9 @@ int wildmenu_process_key(CmdlineInfo *cclp, int key, expand_T *xp)
if (!found) {
j = i;
- } else if (STRNCMP(cclp->cmdbuff + j, upseg, 4) == 0) {
+ } else if (strncmp(cclp->cmdbuff + j, upseg, 4) == 0) {
j += 4;
- } else if (STRNCMP(cclp->cmdbuff + j, upseg + 1, 3) == 0
+ } else if (strncmp(cclp->cmdbuff + j, upseg + 1, 3) == 0
&& j == i) {
j += 3;
} else {
@@ -3037,7 +3037,7 @@ int wildmenu_process_key(CmdlineInfo *cclp, int key, expand_T *xp)
// TODO(tarruda): this is only for DOS/Unix systems - need to put in
// machine-specific stuff here and in upseg init
cmdline_del(cclp, j);
- put_on_cmdline(upseg + 1, 3, false);
+ put_on_cmdline((char_u *)upseg + 1, 3, false);
} else if (cclp->cmdpos > i) {
cmdline_del(cclp, i);
}