mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
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:
@@ -288,15 +288,15 @@ int check_signcolumn(win_T *wp)
|
||||
}
|
||||
|
||||
if (check_opt_strings(val, p_scl_values, false) == OK) {
|
||||
if (!strncmp(val, S_LEN("no"))) { // no
|
||||
if (!strncmp(val, "no", 2)) { // no
|
||||
wp->w_minscwidth = wp->w_maxscwidth = SCL_NO;
|
||||
} else if (!strncmp(val, S_LEN("nu")) && (wp->w_p_nu || wp->w_p_rnu)) { // number
|
||||
} else if (!strncmp(val, "nu", 2) && (wp->w_p_nu || wp->w_p_rnu)) { // number
|
||||
wp->w_minscwidth = wp->w_maxscwidth = SCL_NUM;
|
||||
} else if (!strncmp(val, S_LEN("yes:"))) { // yes:<NUM>
|
||||
} else if (!strncmp(val, "yes:", 4)) { // yes:<NUM>
|
||||
wp->w_minscwidth = wp->w_maxscwidth = val[4] - '0';
|
||||
} else if (*val == 'y') { // yes
|
||||
wp->w_minscwidth = wp->w_maxscwidth = 1;
|
||||
} else if (!strncmp(val, S_LEN("auto:"))) { // auto:<NUM>
|
||||
} else if (!strncmp(val, "auto:", 5)) { // auto:<NUM>
|
||||
wp->w_minscwidth = 0;
|
||||
wp->w_maxscwidth = val[5] - '0';
|
||||
} else { // auto
|
||||
@@ -306,7 +306,7 @@ int check_signcolumn(win_T *wp)
|
||||
return OK;
|
||||
}
|
||||
|
||||
if (strncmp(val, S_LEN("auto:")) != 0
|
||||
if (strncmp(val, "auto:", 5) != 0
|
||||
|| strlen(val) != 8
|
||||
|| !ascii_isdigit(val[5])
|
||||
|| val[6] != '-'
|
||||
@@ -1732,9 +1732,9 @@ const char *did_set_mousescroll(optset_T *args FUNC_ATTR_UNUSED)
|
||||
|
||||
OptInt *direction;
|
||||
|
||||
if (memcmp(string, S_LEN("ver:")) == 0) {
|
||||
if (memcmp(string, "ver:", 4) == 0) {
|
||||
direction = &vertical;
|
||||
} else if (memcmp(string, S_LEN("hor:")) == 0) {
|
||||
} else if (memcmp(string, "hor:", 4) == 0) {
|
||||
direction = &horizontal;
|
||||
} else {
|
||||
return e_invarg;
|
||||
|
Reference in New Issue
Block a user