To: vim-dev@vim.org Subject: Patch 6.2.269 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.269 Problem: Diff mode does not highlight a change in a combining character. (Raphael Finkel) Solution: Make diff_find_change() multi-byte aware: find the start byte of a character that contains a change. Files: src/diff.c *** ../vim-6.2.268/src/diff.c Mon Feb 2 12:53:51 2004 --- src/diff.c Tue Feb 17 16:53:25 2004 *************** *** 1613,1618 **** --- 1613,1627 ---- /* Search for start of difference */ for (si = 0; line_org[si] != NUL && line_org[si] == line_new[si]; ) ++si; + #ifdef FEAT_MBYTE + if (has_mbyte) + { + /* Move back to first byte of character in both lines (may + * have "nn^" in line_org and "n^ in line_new). */ + si -= (*mb_head_off)(line_org, line_org + si); + si -= (*mb_head_off)(line_new, line_new + si); + } + #endif if (*startp > si) *startp = si; *** ../vim-6.2.268/src/version.c Tue Feb 17 21:31:23 2004 --- src/version.c Tue Feb 17 21:36:06 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 269, /**/ -- hundred-and-one symptoms of being an internet addict: 172. You join listservers just for the extra e-mail. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///