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/search.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/search.c')
-rw-r--r-- | src/nvim/search.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 234ffb75cb..74ae76e3b2 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -95,7 +95,7 @@ static struct spat spats[2] = { static int last_idx = 0; // index in spats[] for RE_LAST -static char_u lastc[2] = { NUL, NUL }; // last character searched for +static uint8_t lastc[2] = { NUL, NUL }; // last character searched for static Direction lastcdir = FORWARD; // last direction of character search static int last_t_cmd = true; // last search t_cmd static char lastc_bytes[MB_MAXBYTES + 1]; @@ -439,7 +439,7 @@ int last_csearch_until(void) void set_last_csearch(int c, char *s, int len) { - *lastc = (char_u)c; + *lastc = (uint8_t)c; lastc_bytelen = len; if (len) { memcpy(lastc_bytes, s, (size_t)len); @@ -1053,7 +1053,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, long count, i // Find out the direction of the search. if (dirc == 0) { - dirc = (char_u)spats[0].off.dir; + dirc = (uint8_t)spats[0].off.dir; } else { spats[0].off.dir = (char)dirc; set_vv_searchforward(); @@ -1510,7 +1510,7 @@ int searchc(cmdarg_T *cap, int t_cmd) if (c != NUL) { // normal search: remember args for repeat if (!KeyStuffed) { // don't remember when redoing - *lastc = (char_u)c; + *lastc = (uint8_t)c; set_csearch_direction(dir); set_csearch_until(t_cmd); lastc_bytelen = utf_char2bytes(c, lastc_bytes); @@ -3125,8 +3125,7 @@ static int fuzzy_match_recursive(const char *fuzpat, const char *str, uint32_t s /// normalized and varies with pattern. /// Recursion is limited internally (default=10) to prevent degenerate cases /// (pat_arg="aaaaaa" str="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"). -/// Uses char_u for match indices. Therefore patterns are limited to -/// MAX_FUZZY_MATCHES characters. +/// Patterns are limited to MAX_FUZZY_MATCHES characters. /// /// @return true if "pat_arg" matches "str". Also returns the match score in /// "outScore" and the matching character positions in "matches". |