summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-12-13 03:36:39 +0100
committerBram Moolenaar <Bram@vim.org>2014-12-13 03:36:39 +0100
commitaff5c3a5304d85b53b00fd67418d53056b663ba9 (patch)
treebd0e258743c7b508a1fb8097036c0f9e2eae26eb /src/screen.c
parentd96c52c71b85d848f23f58dfb8463279a39bfe84 (diff)
downloadvim-git-aff5c3a5304d85b53b00fd67418d53056b663ba9.tar.gz
updated for version 7.4.545v7.4.545
Problem: Highlighting for multi-line matches is not correct. Solution: Stop highlight at the end of the match. (Hirohito Higashi)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index d39513862..e7b8e78d7 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3864,9 +3864,15 @@ win_line(wp, lnum, startrow, endrow, nochange)
&& 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);