aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/version.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerDundar Göc <gocdundar@gmail.com>2022-08-29 15:48:56 +0200
commit58f30a326f34319801e7921f32c83e8320d85f6c (patch)
treec0afa78a82826ad837869b56dc3493b55d3b4195 /src/nvim/version.c
parent92bc11a891538e5c306915bffef437f097572d09 (diff)
downloadrneovim-58f30a326f34319801e7921f32c83e8320d85f6c.tar.gz
rneovim-58f30a326f34319801e7921f32c83e8320d85f6c.tar.bz2
rneovim-58f30a326f34319801e7921f32c83e8320d85f6c.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r--src/nvim/version.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 46e3a67388..5888d4614e 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -2274,7 +2274,7 @@ void intro_message(int colon)
}
if (*p != NUL) {
- do_intro_line(row, (char_u *)_(p), 0);
+ do_intro_line(row, _(p), 0);
}
row++;
}
@@ -2287,15 +2287,14 @@ void intro_message(int colon)
}
}
-static void do_intro_line(long row, char_u *mesg, int attr)
+static void do_intro_line(long row, char *mesg, int attr)
{
- long col;
- char_u *p;
+ char *p;
int l;
int clen;
// Center the message horizontally.
- col = vim_strsize((char *)mesg);
+ long col = vim_strsize(mesg);
col = (Columns - col) / 2;
@@ -2310,8 +2309,8 @@ 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((char *)p + l);
- l += utfc_ptr2len((char *)p + l) - 1;
+ clen += ptr2cells(p + l);
+ l += utfc_ptr2len(p + l) - 1;
}
assert(row <= INT_MAX && col <= INT_MAX);
grid_puts_len(&default_grid, p, l, (int)row, (int)col,