mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
refactor: use S_LEN(s) instead of s, n (#29219)
This commit is contained in:
@@ -473,7 +473,7 @@ void trunc_string(const char *s, char *buf, int room_in, int buflen)
|
||||
}
|
||||
} else if (e + 3 < buflen) {
|
||||
// set the middle and copy the last part
|
||||
memmove(buf + e, "...", 3);
|
||||
memmove(buf + e, S_LEN("..."));
|
||||
len = (int)strlen(s + i) + 1;
|
||||
if (len >= buflen - e - 3) {
|
||||
len = buflen - e - 3 - 1;
|
||||
@@ -3182,7 +3182,7 @@ static void redir_write(const char *const str, const ptrdiff_t maxlen)
|
||||
if (*s != '\n' && *s != '\r') {
|
||||
while (cur_col < msg_col) {
|
||||
if (capture_ga) {
|
||||
ga_concat_len(capture_ga, " ", 1);
|
||||
ga_concat_len(capture_ga, S_LEN(" "));
|
||||
}
|
||||
if (redir_reg) {
|
||||
write_reg_contents(redir_reg, " ", 1, true);
|
||||
|
Reference in New Issue
Block a user