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/api/private/helpers.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/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 9f894d5533..a2ee4f91bc 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -654,9 +654,9 @@ void modify_keymap(uint64_t channel_id, Buffer buffer, bool is_unmap, String mod int mode_val; // integer value of the mapping mode, to be passed to do_map() char *p = (mode.size) ? mode.data : "m"; if (STRNCMP(p, "!", 2) == 0) { - mode_val = get_map_mode((char_u **)&p, true); // mapmode-ic + mode_val = get_map_mode(&p, true); // mapmode-ic } else { - mode_val = get_map_mode((char_u **)&p, false); + mode_val = get_map_mode(&p, false); if ((mode_val == VISUAL + SELECTMODE + NORMAL + OP_PENDING) && mode.size > 0) { // get_map_mode() treats unrecognized mode shortnames as ":map". @@ -1128,7 +1128,7 @@ ArrayOf(Dictionary) keymap_array(String mode, buf_T *buf, bool from_lua) // Convert the string mode to the integer mode // that is stored within each mapblock - char_u *p = (char_u *)mode.data; + char *p = mode.data; int int_mode = get_map_mode(&p, 0); // Determine the desired buffer value @@ -1666,11 +1666,11 @@ int init_sign_text(char **sign_text, char *text) // Count cells and check for non-printable chars int cells = 0; - for (s = text; s < endp; s += utfc_ptr2len((char_u *)s)) { - if (!vim_isprintc(utf_ptr2char((char_u *)s))) { + for (s = text; s < endp; s += utfc_ptr2len(s)) { + if (!vim_isprintc(utf_ptr2char(s))) { break; } - cells += utf_ptr2cells((char_u *)s); + cells += utf_ptr2cells(s); } // Currently must be empty, one or two display cells if (s != endp || cells > 2) { |