aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-06-13 22:20:06 +0100
committerGitHub <noreply@github.com>2024-06-14 05:20:06 +0800
commit43d8435cf84468e776e0a6a98d05ae7bd62583b7 (patch)
treea298243e08d6a29961464e52167d7736a875f477 /src/nvim/cmdexpand.c
parent6589d058943405a688b9a3bba11d1869a7d318f8 (diff)
downloadrneovim-43d8435cf84468e776e0a6a98d05ae7bd62583b7.tar.gz
rneovim-43d8435cf84468e776e0a6a98d05ae7bd62583b7.tar.bz2
rneovim-43d8435cf84468e776e0a6a98d05ae7bd62583b7.zip
revert: "refactor: use S_LEN macro" (#29319)
revert: "refactor: use S_LEN(s) instead of s, n (#29219)" This reverts commit c37695a5d5f2e8914fff86f3581bed70b4c85d3c.
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index fdb452aee4..f75b84c77b 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -2247,7 +2247,7 @@ static const char *set_one_cmd_context(expand_T *xp, const char *buff)
// Does command allow "++argopt" argument?
if (ea.argt & EX_ARGOPT) {
- while (*arg != NUL && strncmp(arg, S_LEN("++")) == 0) {
+ while (*arg != NUL && strncmp(arg, "++", 2) == 0) {
p = arg + 2;
while (*p && !ascii_isspace(*p)) {
MB_PTR_ADV(p);
@@ -2774,7 +2774,7 @@ static int ExpandFromContext(expand_T *xp, char *pat, char ***matches, int *numM
// When expanding a function name starting with s:, match the <SNR>nr_
// prefix.
char *tofree = NULL;
- if (xp->xp_context == EXPAND_USER_FUNC && strncmp(pat, S_LEN("^s:")) == 0) {
+ if (xp->xp_context == EXPAND_USER_FUNC && strncmp(pat, "^s:", 3) == 0) {
const size_t len = strlen(pat) + 20;
tofree = xmalloc(len);
@@ -3564,7 +3564,7 @@ void f_getcompletion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
if (xpc.xp_context == EXPAND_USER_DEFINED) {
// Must be "custom,funcname" pattern
- if (strncmp(type, S_LEN("custom,")) != 0) {
+ if (strncmp(type, "custom,", 7) != 0) {
semsg(_(e_invarg2), type);
return;
}
@@ -3574,7 +3574,7 @@ void f_getcompletion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
if (xpc.xp_context == EXPAND_USER_LIST) {
// Must be "customlist,funcname" pattern
- if (strncmp(type, S_LEN("customlist,")) != 0) {
+ if (strncmp(type, "customlist,", 11) != 0) {
semsg(_(e_invarg2), type);
return;
}