From 59de417b904bbd204e313f015839317b577bd124 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 9 Jun 2020 19:34:54 +0200 Subject: patch 8.2.0938: NFA regexp uses tolower ()to compare ignore-case Problem: NFA regexp uses tolower() to compare ignore-case. (Thayne McCombs) Solution: Use utf_fold() when possible. (ref. neovim #12456) --- src/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/diff.c') diff --git a/src/diff.c b/src/diff.c index 1b0ad47782..bb95d5ed65 100644 --- a/src/diff.c +++ b/src/diff.c @@ -747,7 +747,7 @@ diff_write_buffer(buf_T *buf, diffin_T *din) // xdiff doesn't support ignoring case, fold-case the text. c = PTR2CHAR(s); - c = enc_utf8 ? utf_fold(c) : MB_TOLOWER(c); + c = MB_CASEFOLD(c); orig_len = mb_ptr2len(s); if (mb_char2bytes(c, cbuf) != orig_len) // TODO: handle byte length difference -- cgit v1.2.3