diff src/diff.c @ 20772:097f5b5c907b v8.2.0938

patch 8.2.0938: NFA regexp uses tolower ()to compare ignore-case Commit: https://github.com/vim/vim/commit/59de417b904bbd204e313f015839317b577bd124 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 9 19:34:54 2020 +0200 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 https://github.com/vim/vim/issues/12456)
author Bram Moolenaar <Bram@vim.org>
date Tue, 09 Jun 2020 19:45:03 +0200
parents d9a2e5dcfd9f
children e82579016863
line wrap: on
line diff
--- a/src/diff.c
+++ b/src/diff.c
@@ -747,7 +747,7 @@ diff_write_buffer(buf_T *buf, diffin_T *
 
 		// 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