diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-09 15:37:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 22:37:34 +0800 |
commit | 50f03773f4b9f4638489ccfd0503dc9e39e5de78 (patch) | |
tree | 2471c7596d233b66cacc36986bea0a31e9ba96ea /src/nvim/mapping.c | |
parent | 9cd7edc6ad884f59b0be9dda3523ff88f4dca705 (diff) | |
download | rneovim-50f03773f4b9f4638489ccfd0503dc9e39e5de78.tar.gz rneovim-50f03773f4b9f4638489ccfd0503dc9e39e5de78.tar.bz2 rneovim-50f03773f4b9f4638489ccfd0503dc9e39e5de78.zip |
refactor: replace char_u with char 18 (#21237)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r-- | src/nvim/mapping.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 199cc7b369..757855c350 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -589,13 +589,13 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev, // vi-compatible way. int same = -1; - const int first = vim_iswordp((char_u *)lhs); + const int first = vim_iswordp(lhs); int last = first; p = (char *)lhs + utfc_ptr2len((char *)lhs); n = 1; while (p < (char *)lhs + len) { n++; // nr of (multi-byte) chars - last = vim_iswordp((char_u *)p); // type of last char + last = vim_iswordp(p); // type of last char if (same == -1 && last != first) { same = n - 1; // count of same char type } @@ -1419,18 +1419,18 @@ bool check_abbr(int c, char *ptr, int col, int mincol) { bool vim_abbr; char_u *p = mb_prevptr((char_u *)ptr, (char_u *)ptr + col); - if (!vim_iswordp(p)) { + if (!vim_iswordp((char *)p)) { vim_abbr = true; // Vim added abbr. } else { vim_abbr = false; // vi compatible abbr. if (p > (char_u *)ptr) { - is_id = vim_iswordp(mb_prevptr((char_u *)ptr, p)); + is_id = vim_iswordp((char *)mb_prevptr((char_u *)ptr, p)); } } clen = 1; while (p > (char_u *)ptr + mincol) { p = mb_prevptr((char_u *)ptr, p); - if (ascii_isspace(*p) || (!vim_abbr && is_id != vim_iswordp(p))) { + if (ascii_isspace(*p) || (!vim_abbr && is_id != vim_iswordp((char *)p))) { p += utfc_ptr2len((char *)p); break; } |