aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index 3396e2de41..0cc2189948 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -268,7 +268,7 @@ int buf_init_chartab(buf_T *buf, int global)
void trans_characters(char *buf, int bufsize)
{
char_u *trs; // translated character
- int len = (int)STRLEN(buf); // length of string needing translation
+ int len = (int)strlen(buf); // length of string needing translation
int room = bufsize - len; // room in buffer after string
while (*buf != 0) {
@@ -913,7 +913,7 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *en
int ts = (int)wp->w_buffer->b_p_ts;
colnr_T vcol = 0;
- char *line = ptr = (char *)ml_get_buf(wp->w_buffer, pos->lnum, false); // start of the line
+ char *line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, false); // start of the line
if (pos->col == MAXCOL) {
// continue until the NUL
@@ -1076,9 +1076,9 @@ void getvvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *e
colnr_T endadd = 0;
// Cannot put the cursor on part of a wide character.
- char *ptr = (char *)ml_get_buf(wp->w_buffer, pos->lnum, false);
+ char *ptr = ml_get_buf(wp->w_buffer, pos->lnum, false);
- if (pos->col < (colnr_T)STRLEN(ptr)) {
+ if (pos->col < (colnr_T)strlen(ptr)) {
int c = utf_ptr2char(ptr + pos->col);
if ((c != TAB) && vim_isprintc(c)) {
endadd = (colnr_T)(char2cells(c) - 1);
@@ -1157,7 +1157,7 @@ char *skipwhite(const char *const p)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
FUNC_ATTR_NONNULL_RET
{
- return skipwhite_len(p, STRLEN(p));
+ return skipwhite_len(p, strlen(p));
}
/// Like `skipwhite`, but skip up to `len` characters.