diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-06-13 22:20:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 05:20:06 +0800 |
commit | 43d8435cf84468e776e0a6a98d05ae7bd62583b7 (patch) | |
tree | a298243e08d6a29961464e52167d7736a875f477 /src/nvim/help.c | |
parent | 6589d058943405a688b9a3bba11d1869a7d318f8 (diff) | |
download | rneovim-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/help.c')
-rw-r--r-- | src/nvim/help.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/help.c b/src/nvim/help.c index 6ba3e17e0b..0da846bb9f 100644 --- a/src/nvim/help.c +++ b/src/nvim/help.c @@ -655,7 +655,7 @@ void get_local_additions(void) // files. This uses the very first line in the help file. char *const fname = path_tail(curbuf->b_fname); if (path_fnamecmp(fname, "help.txt") == 0 - || (path_fnamencmp(fname, S_LEN("help.")) == 0 + || (path_fnamencmp(fname, "help.", 5) == 0 && ASCII_ISALPHA(fname[5]) && ASCII_ISALPHA(fname[6]) && TOLOWER_ASC(fname[7]) == 'x' @@ -1015,7 +1015,7 @@ static void helptags_one(char *dir, const char *ext, const char *tagfname, bool // Write the tags into the file. for (int i = 0; i < ga.ga_len; i++) { s = ((char **)ga.ga_data)[i]; - if (strncmp(s, S_LEN("help-tags\t")) == 0) { + if (strncmp(s, "help-tags\t", 10) == 0) { // help-tags entry was added in formatted form fputs(s, fd_tags); } else { @@ -1149,7 +1149,7 @@ void ex_helptags(exarg_T *eap) bool add_help_tags = false; // Check for ":helptags ++t {dir}". - if (strncmp(eap->arg, S_LEN("++t")) == 0 && ascii_iswhite(eap->arg[3])) { + if (strncmp(eap->arg, "++t", 3) == 0 && ascii_iswhite(eap->arg[3])) { add_help_tags = true; eap->arg = skipwhite(eap->arg + 3); } |