aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.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/syntax.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/syntax.c')
-rw-r--r--src/nvim/syntax.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 538863326c..d1af8f304c 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -3186,7 +3186,7 @@ static void syn_cmd_onoff(exarg_T *eap, char *name)
if (!eap->skip) {
did_syntax_onoff = true;
char buf[100];
- memcpy(buf, S_LEN("so ") + 1);
+ memcpy(buf, "so ", 4);
vim_snprintf(buf + 3, sizeof(buf) - 3, SYNTAX_FNAME, name);
do_cmdline_cmd(buf);
}
@@ -4296,7 +4296,7 @@ static void syn_cmd_region(exarg_T *eap, int syncing)
if (item == ITEM_MATCHGROUP) {
char *p = skiptowhite(rest);
- if ((p - rest == 4 && strncmp(rest, S_LEN("NONE")) == 0) || eap->skip) {
+ if ((p - rest == 4 && strncmp(rest, "NONE", 4) == 0) || eap->skip) {
matchgroup_id = 0;
} else {
matchgroup_id = syn_check_group(rest, (size_t)(p - rest));
@@ -4815,10 +4815,10 @@ static void syn_cmd_sync(exarg_T *eap, int syncing)
} else if (!eap->skip) {
curwin->w_s->b_syn_sync_id = (int16_t)syn_name2id("Comment");
}
- } else if (strncmp(key, S_LEN("LINES")) == 0
- || strncmp(key, S_LEN("MINLINES")) == 0
- || strncmp(key, S_LEN("MAXLINES")) == 0
- || strncmp(key, S_LEN("LINEBREAKS")) == 0) {
+ } else if (strncmp(key, "LINES", 5) == 0
+ || strncmp(key, "MINLINES", 8) == 0
+ || strncmp(key, "MAXLINES", 8) == 0
+ || strncmp(key, "LINEBREAKS", 10) == 0) {
if (key[4] == 'S') {
arg_end = key + 6;
} else if (key[0] == 'L') {