mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
vim-patch:8.1.0805: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, part 1.
135059724f
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user