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/diff.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/diff.c')
-rw-r--r-- | src/nvim/diff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 6b606f50a1..7e296ebf52 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -750,10 +750,10 @@ static int diff_write_buffer(buf_T *buf, diffin_T *din) c = NUL; } else { // xdiff doesn't support ignoring case, fold-case the text. - c = utf_ptr2char(s); + c = utf_ptr2char((char *)s); c = utf_fold(c); } - const int orig_len = utfc_ptr2len(s); + const int orig_len = utfc_ptr2len((char *)s); if (utf_char2bytes(c, cbuf) != orig_len) { // TODO(Bram): handle byte length difference memmove(ptr + len, s, (size_t)orig_len); @@ -1937,15 +1937,15 @@ static bool diff_equal_entry(diff_T *dp, int idx1, int idx2) // ignoring case) return true and set "len" to the number of bytes. static bool diff_equal_char(const char_u *const p1, const char_u *const p2, int *const len) { - const int l = utfc_ptr2len(p1); + const int l = utfc_ptr2len((char *)p1); - if (l != utfc_ptr2len(p2)) { + if (l != utfc_ptr2len((char *)p2)) { return false; } if (l > 1) { if (STRNCMP(p1, p2, l) != 0 && (!(diff_flags & DIFF_ICASE) - || utf_fold(utf_ptr2char(p1)) != utf_fold(utf_ptr2char(p2)))) { + || utf_fold(utf_ptr2char((char *)p1)) != utf_fold(utf_ptr2char((char *)p2)))) { return false; } *len = l; |