aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-12 18:31:59 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-12 21:22:06 -0500
commit5d6ecfa3c7447009da75842c611ea1b9f1db83e7 (patch)
treebe2a450a71101292ba5608fb2846f8340ad1f5f4 /src/nvim/diff.c
parent93c18867a0e79bf71bffa9f8ce533f224d759ee5 (diff)
downloadrneovim-5d6ecfa3c7447009da75842c611ea1b9f1db83e7.tar.gz
rneovim-5d6ecfa3c7447009da75842c611ea1b9f1db83e7.tar.bz2
rneovim-5d6ecfa3c7447009da75842c611ea1b9f1db83e7.zip
vim-patch:8.1.0805: too many #ifdefs
Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 1. https://github.com/vim/vim/commit/135059724f140ceac889c9f8136bd1bf5c41d49d
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index b9c293f6c8..1cdf84f9d0 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -719,15 +719,12 @@ static int diff_write_buffer(buf_T *buf, diffin_T *din)
for (lnum = 1; lnum <= buf->b_ml.ml_line_count; lnum++) {
for (s = ml_get_buf(buf, lnum, false); *s != NUL; ) {
if (diff_flags & DIFF_ICASE) {
- int c;
-
- // xdiff doesn't support ignoring case, fold-case the text.
- int orig_len;
char_u cbuf[MB_MAXBYTES + 1];
- c = PTR2CHAR(s);
+ // xdiff doesn't support ignoring case, fold-case the text.
+ int c = PTR2CHAR(s);
c = utf_fold(c);
- orig_len = utfc_ptr2len(s);
+ const int orig_len = utfc_ptr2len(s);
if (utf_char2bytes(c, cbuf) != orig_len) {
// TODO(Bram): handle byte length difference
memmove(ptr + len, s, orig_len);