revert: "refactor: use S_LEN macro" (#29319)

revert: "refactor: use S_LEN(s) instead of s, n (#29219)"

This reverts commit c37695a5d5.
This commit is contained in:
Lewis Russell
2024-06-13 22:20:06 +01:00
committed by GitHub
parent 6589d05894
commit 43d8435cf8
42 changed files with 258 additions and 263 deletions

View File

@@ -422,10 +422,10 @@ char *get_user_cmd_complete(expand_T *xp, int idx)
int cmdcomplete_str_to_type(const char *complete_str)
{
if (strncmp(complete_str, S_LEN("custom,")) == 0) {
if (strncmp(complete_str, "custom,", 7) == 0) {
return EXPAND_USER_DEFINED;
}
if (strncmp(complete_str, S_LEN("customlist,")) == 0) {
if (strncmp(complete_str, "customlist,", 11) == 0) {
return EXPAND_USER_LIST;
}
@@ -1056,7 +1056,7 @@ void ex_delcommand(exarg_T *eap)
const char *arg = eap->arg;
bool buffer_only = false;
if (strncmp(arg, S_LEN("-buffer")) == 0 && ascii_iswhite(arg[7])) {
if (strncmp(arg, "-buffer", 7) == 0 && ascii_iswhite(arg[7])) {
buffer_only = true;
arg = skipwhite(arg + 7);
}