mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
refactor: replace char_u #18429
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -2020,7 +2020,7 @@ void ex_version(exarg_T *eap)
|
||||
/// @param wrap
|
||||
static void version_msg_wrap(char *s, int wrap)
|
||||
{
|
||||
int len = vim_strsize((char_u *)s) + (wrap ? 2 : 0);
|
||||
int len = vim_strsize(s) + (wrap ? 2 : 0);
|
||||
|
||||
if (!got_int
|
||||
&& (len < Columns)
|
||||
@@ -2071,7 +2071,7 @@ void list_in_columns(char_u **items, int size, int current)
|
||||
// Find the length of the longest item, use that + 1 as the column width.
|
||||
int i;
|
||||
for (i = 0; size < 0 ? items[i] != NULL : i < size; i++) {
|
||||
int l = vim_strsize(items[i]) + (i == current ? 2 : 0);
|
||||
int l = vim_strsize((char *)items[i]) + (i == current ? 2 : 0);
|
||||
|
||||
if (l > width) {
|
||||
width = l;
|
||||
@@ -2294,7 +2294,7 @@ static void do_intro_line(long row, char_u *mesg, int attr)
|
||||
int clen;
|
||||
|
||||
// Center the message horizontally.
|
||||
col = vim_strsize(mesg);
|
||||
col = vim_strsize((char *)mesg);
|
||||
|
||||
col = (Columns - col) / 2;
|
||||
|
||||
@@ -2309,7 +2309,7 @@ static void do_intro_line(long row, char_u *mesg, int attr)
|
||||
for (l = 0;
|
||||
p[l] != NUL && (l == 0 || (p[l] != '<' && p[l - 1] != '>'));
|
||||
l++) {
|
||||
clen += ptr2cells(p + l);
|
||||
clen += ptr2cells((char *)p + l);
|
||||
l += utfc_ptr2len((char *)p + l) - 1;
|
||||
}
|
||||
assert(row <= INT_MAX && col <= INT_MAX);
|
||||
|
Reference in New Issue
Block a user