diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-02-11 11:05:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 11:05:57 +0100 |
commit | 4be6c6cf0ddf5e31d4103cb5df06651ba6f4897b (patch) | |
tree | 70f45c47ebd0d29ae8060c39cce39b853edf3760 /src/nvim/mapping.c | |
parent | ee87b848a2dc7ca3d3cfb871afcd351274f612dc (diff) | |
download | rneovim-4be6c6cf0ddf5e31d4103cb5df06651ba6f4897b.tar.gz rneovim-4be6c6cf0ddf5e31d4103cb5df06651ba6f4897b.tar.bz2 rneovim-4be6c6cf0ddf5e31d4103cb5df06651ba6f4897b.zip |
refactor: replace char_u with char (#21901)
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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 5547b6c367..c740fb41bc 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -1162,7 +1162,7 @@ static bool expand_buffer = false; /// @param cpo_flags Value of various flags present in &cpo /// /// @return NULL when there is a problem. -static char_u *translate_mapping(char_u *str, int cpo_flags) +static char *translate_mapping(char_u *str, int cpo_flags) { garray_T ga; ga_init(&ga, 1, 40); @@ -1203,7 +1203,7 @@ static char_u *translate_mapping(char_u *str, int cpo_flags) } } ga_append(&ga, NUL); - return (char_u *)(ga.ga_data); + return (char *)ga.ga_data; } /// Work out what to complete when doing command line completion of mapping @@ -1212,8 +1212,8 @@ static char_u *translate_mapping(char_u *str, int cpo_flags) /// @param forceit true if '!' given /// @param isabbrev true if abbreviation /// @param isunmap true if unmap/unabbrev command -char_u *set_context_in_map_cmd(expand_T *xp, char *cmd, char *arg, bool forceit, bool isabbrev, - bool isunmap, cmdidx_T cmdidx) +char *set_context_in_map_cmd(expand_T *xp, char *cmd, char *arg, bool forceit, bool isabbrev, + bool isunmap, cmdidx_T cmdidx) { if (forceit && cmdidx != CMD_map && cmdidx != CMD_unmap) { xp->xp_context = EXPAND_NOTHING; @@ -1346,7 +1346,7 @@ int ExpandMappings(char *pat, regmatch_T *regmatch, int *numMatches, char ***mat continue; } - char *p = (char *)translate_mapping((char_u *)mp->m_keys, CPO_TO_CPO_FLAGS); + char *p = translate_mapping((char_u *)mp->m_keys, CPO_TO_CPO_FLAGS); if (p == NULL) { continue; } @@ -1503,7 +1503,7 @@ bool check_abbr(int c, char *ptr, int col, int mincol) if (strchr((const char *)mp->m_keys, K_SPECIAL) != NULL) { // Might have K_SPECIAL escaped mp->m_keys. q = xstrdup(mp->m_keys); - vim_unescape_ks((char_u *)q); + vim_unescape_ks(q); qlen = (int)strlen(q); } // find entries with right mode and keys @@ -1607,7 +1607,7 @@ char *eval_map_expr(mapblock_T *mp, int c) // typeahead. if (mp->m_luaref == LUA_NOREF) { expr = xstrdup(mp->m_str); - vim_unescape_ks((char_u *)expr); + vim_unescape_ks(expr); } const bool replace_keycodes = mp->m_replace_keycodes; |