# HG changeset patch # User Bram Moolenaar # Date 1418438199 -3600 # Node ID d2239abd3edb1e3672916c15ea8df6a01d1b86c6 # Parent bdf765b65978020748417bbf614924b385e1b3cc updated for version 7.4.545 Problem: Highlighting for multi-line matches is not correct. Solution: Stop highlight at the end of the match. (Hirohito Higashi) diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -3864,9 +3864,15 @@ win_line(wp, lnum, startrow, endrow, noc && v >= (long)shl->startcol && v < (long)shl->endcol) { +#ifdef FEAT_MBYTE + int tmp_col = v + MB_PTR2LEN(ptr); + + if (shl->endcol < tmp_col) + shl->endcol = tmp_col; +#endif shl->attr_cur = shl->attr; } - else if (v >= (long)shl->endcol && shl->lnum == lnum) + else if (v == (long)shl->endcol) { shl->attr_cur = 0; next_search_hl(wp, shl, lnum, (colnr_T)v, cur); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 545, +/**/ 544, /**/ 543,