To: vim-dev@vim.org Subject: Patch 6.1b.026 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1b.026 Problem: When 'diffopt' contains 'iwhite' but not 'icase': differences in case are not highlighted properly. (Gerhard Hochholzer) Solution: Don't ignore case when ignoring white space differences. Files: src/diff.c *** ../vim61b.025/src/diff.c Sat Mar 9 21:46:23 2002 --- src/diff.c Tue Mar 19 19:38:47 2002 *************** *** 1341,1347 **** if ((diff_flags & DIFF_ICASE) && !(diff_flags & DIFF_IWHITE)) return MB_STRICMP(s1, s2); ! /* Ignore case AND ignore white space changes. */ p1 = s1; p2 = s2; while (*p1 != NUL && *p2 != NUL) --- 1341,1347 ---- if ((diff_flags & DIFF_ICASE) && !(diff_flags & DIFF_IWHITE)) return MB_STRICMP(s1, s2); ! /* Ignore white space changes and possibly ignore case. */ p1 = s1; p2 = s2; while (*p1 != NUL && *p2 != NUL) *************** *** 1360,1366 **** if (l > 1) { if (STRNCMP(p1, p2, l) != 0 ! && (!enc_utf8 || utf_fold(utf_ptr2char(p1)) != utf_fold(utf_ptr2char(p2)))) break; p1 += l; --- 1360,1368 ---- if (l > 1) { if (STRNCMP(p1, p2, l) != 0 ! && (!enc_utf8 ! || !(diff_flags & DIFF_ICASE) ! || utf_fold(utf_ptr2char(p1)) != utf_fold(utf_ptr2char(p2)))) break; p1 += l; *************** *** 1369,1375 **** else #endif { ! if (*p1 != *p2 && TO_LOWER(*p1) != TO_LOWER(*p2)) break; ++p1; ++p2; --- 1371,1378 ---- else #endif { ! if (*p1 != *p2 && (!(diff_flags & DIFF_ICASE) ! || TO_LOWER(*p1) != TO_LOWER(*p2))) break; ++p1; ++p2; *** ../vim61b.025/src/version.c Mon Mar 18 21:50:22 2002 --- src/version.c Tue Mar 19 19:44:05 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 26, /**/ -- Men may not be seen publicly in any kind of strapless gown. [real standing law in Florida, United States of America] /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///