diff options
| author | bfredl <bjorn.linse@gmail.com> | 2022-05-07 16:40:00 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-07 16:40:00 +0200 | 
| commit | 03471e292d48283379a397dadf902572de91b359 (patch) | |
| tree | e0736597ec1b49250a128a58ae0f7e7e217c3f2f /src/nvim/eval.c | |
| parent | eccb9896894f0e092b8d3c2519eb81b2a3fb3cca (diff) | |
| parent | 2a378e6e82cececb12339f2df51ffe107039d867 (diff) | |
| download | rneovim-03471e292d48283379a397dadf902572de91b359.tar.gz rneovim-03471e292d48283379a397dadf902572de91b359.tar.bz2 rneovim-03471e292d48283379a397dadf902572de91b359.zip | |
Merge pull request #18425 from dundargoc/refactor/char_u/1
refactor: replace char_u variables and functions with char
Diffstat (limited to 'src/nvim/eval.c')
| -rw-r--r-- | src/nvim/eval.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 548dd96444..901976bb16 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2656,7 +2656,7 @@ bool next_for_item(void *fi_void, char *arg)    }    if (fi->fi_string != NULL) { -    const int len = utfc_ptr2len((char_u *)fi->fi_string + fi->fi_byte_idx); +    const int len = utfc_ptr2len(fi->fi_string + fi->fi_byte_idx);      if (len == 0) {        return false;      } @@ -7681,7 +7681,7 @@ int buf_byteidx_to_charidx(buf_T *buf, int lnum, int byteidx)    char *t = str;    int count;    for (count = 0; *t != NUL && t <= str + byteidx; count++) { -    t += utfc_ptr2len((char_u *)t); +    t += utfc_ptr2len(t);    }    // In insert mode, when the cursor is at the end of a non-empty line, @@ -7714,7 +7714,7 @@ int buf_charidx_to_byteidx(buf_T *buf, int lnum, int charidx)    // Convert the character offset to a byte offset    char *t = str;    while (*t != NUL && --charidx > 0) { -    t += utfc_ptr2len((char_u *)t); +    t += utfc_ptr2len(t);    }    return t - str; @@ -10409,7 +10409,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, char *flags        if (regmatch.startp[0] == regmatch.endp[0]) {          if ((char_u *)zero_width == regmatch.startp[0]) {            // avoid getting stuck on a match with an empty string -          int i = utfc_ptr2len((char_u *)tail); +          int i = utfc_ptr2len(tail);            memmove((char_u *)ga.ga_data + ga.ga_len, tail, (size_t)i);            ga.ga_len += i;            tail += i; | 
