aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mapping.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/mapping.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/mapping.c')
-rw-r--r--src/nvim/mapping.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c
index d02c865328..167111f3ae 100644
--- a/src/nvim/mapping.c
+++ b/src/nvim/mapping.c
@@ -403,43 +403,43 @@ static int str_to_mapargs(const char *strargs, bool is_unmap, MapArguments *mapa
// Accept <buffer>, <nowait>, <silent>, <expr>, <script>, and <unique> in
// any order.
while (true) {
- if (strncmp(to_parse, S_LEN("<buffer>")) == 0) {
+ if (strncmp(to_parse, "<buffer>", 8) == 0) {
to_parse = skipwhite(to_parse + 8);
mapargs->buffer = true;
continue;
}
- if (strncmp(to_parse, S_LEN("<nowait>")) == 0) {
+ if (strncmp(to_parse, "<nowait>", 8) == 0) {
to_parse = skipwhite(to_parse + 8);
mapargs->nowait = true;
continue;
}
- if (strncmp(to_parse, S_LEN("<silent>")) == 0) {
+ if (strncmp(to_parse, "<silent>", 8) == 0) {
to_parse = skipwhite(to_parse + 8);
mapargs->silent = true;
continue;
}
// Ignore obsolete "<special>" modifier.
- if (strncmp(to_parse, S_LEN("<special>")) == 0) {
+ if (strncmp(to_parse, "<special>", 9) == 0) {
to_parse = skipwhite(to_parse + 9);
continue;
}
- if (strncmp(to_parse, S_LEN("<script>")) == 0) {
+ if (strncmp(to_parse, "<script>", 8) == 0) {
to_parse = skipwhite(to_parse + 8);
mapargs->script = true;
continue;
}
- if (strncmp(to_parse, S_LEN("<expr>")) == 0) {
+ if (strncmp(to_parse, "<expr>", 6) == 0) {
to_parse = skipwhite(to_parse + 6);
mapargs->expr = true;
continue;
}
- if (strncmp(to_parse, S_LEN("<unique>")) == 0) {
+ if (strncmp(to_parse, "<unique>", 8) == 0) {
to_parse = skipwhite(to_parse + 8);
mapargs->unique = true;
continue;
@@ -1252,32 +1252,32 @@ char *set_context_in_map_cmd(expand_T *xp, char *cmd, char *arg, bool forceit, b
xp->xp_context = EXPAND_MAPPINGS;
expand_buffer = false;
while (true) {
- if (strncmp(arg, S_LEN("<buffer>")) == 0) {
+ if (strncmp(arg, "<buffer>", 8) == 0) {
expand_buffer = true;
arg = skipwhite(arg + 8);
continue;
}
- if (strncmp(arg, S_LEN("<unique>")) == 0) {
+ if (strncmp(arg, "<unique>", 8) == 0) {
arg = skipwhite(arg + 8);
continue;
}
- if (strncmp(arg, S_LEN("<nowait>")) == 0) {
+ if (strncmp(arg, "<nowait>", 8) == 0) {
arg = skipwhite(arg + 8);
continue;
}
- if (strncmp(arg, S_LEN("<silent>")) == 0) {
+ if (strncmp(arg, "<silent>", 8) == 0) {
arg = skipwhite(arg + 8);
continue;
}
- if (strncmp(arg, S_LEN("<special>")) == 0) {
+ if (strncmp(arg, "<special>", 9) == 0) {
arg = skipwhite(arg + 9);
continue;
}
- if (strncmp(arg, S_LEN("<script>")) == 0) {
+ if (strncmp(arg, "<script>", 8) == 0) {
arg = skipwhite(arg + 8);
continue;
}
- if (strncmp(arg, S_LEN("<expr>")) == 0) {
+ if (strncmp(arg, "<expr>", 6) == 0) {
arg = skipwhite(arg + 6);
continue;
}