diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-09 14:13:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 21:13:06 +0800 |
commit | 149209400383c673fdb4fdd1c9a7639139f17936 (patch) | |
tree | d2c4e5fa69fc302ec3050978a303f6a479f30291 /src/nvim/buffer.c | |
parent | fc2cd28547954e64ef429c83733f06fa3ee75d50 (diff) | |
download | rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.gz rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.bz2 rneovim-149209400383c673fdb4fdd1c9a7639139f17936.zip |
refactor: replace char_u with char 17 - remove STRLCPY (#21235)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 239f2aa8ba..58abec351b 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -2760,7 +2760,7 @@ void buflist_list(exarg_T *eap) continue; } if (buf_spname(buf) != NULL) { - STRLCPY(NameBuff, buf_spname(buf), MAXPATHL); + xstrlcpy(NameBuff, buf_spname(buf), MAXPATHL); } else { home_replace(buf, buf->b_fname, (char *)NameBuff, MAXPATHL, true); } @@ -3110,7 +3110,7 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate) *p++ = '"'; if (buf_spname(curbuf) != NULL) { - STRLCPY(p, buf_spname(curbuf), IOSIZE - (p - buffer)); + xstrlcpy(p, buf_spname(curbuf), (size_t)(IOSIZE - (p - buffer))); } else { if (!fullname && curbuf->b_fname != NULL) { name = curbuf->b_fname; @@ -3436,9 +3436,9 @@ void get_rel_pos(win_T *wp, char *buf, int buflen) } below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1; if (below <= 0) { - STRLCPY(buf, (above == 0 ? _("All") : _("Bot")), buflen); + xstrlcpy(buf, (above == 0 ? _("All") : _("Bot")), (size_t)buflen); } else if (above <= 0) { - STRLCPY(buf, _("Top"), buflen); + xstrlcpy(buf, _("Top"), (size_t)buflen); } else { vim_snprintf(buf, (size_t)buflen, "%2d%%", above > 1000000L ? (int)(above / ((above + below) / 100L)) |