diff options
author | Florian Walch <florian@fwalch.com> | 2014-12-24 14:38:54 +0100 |
---|---|---|
committer | Florian Walch <florian@fwalch.com> | 2014-12-24 23:29:00 +0100 |
commit | dde24224ece80e7d4bb079b7361a8c83b0a56208 (patch) | |
tree | 074fac4d0165abfc27ba8e3f7047149fbfb21e5a /src | |
parent | 811cb036d95224989c8d027618a6424dc27e0ad6 (diff) | |
download | rneovim-dde24224ece80e7d4bb079b7361a8c83b0a56208.tar.gz rneovim-dde24224ece80e7d4bb079b7361a8c83b0a56208.tar.bz2 rneovim-dde24224ece80e7d4bb079b7361a8c83b0a56208.zip |
vim-patch:7.4.545
Problem: Highlighting for multi-line matches is not correct.
Solution: Stop highlight at the end of the match. (Hirohito Higashi)
https://code.google.com/p/vim/source/detail?r=v7-4-545
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/screen.c | 7 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 0148979335..324171aca2 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2962,8 +2962,13 @@ win_line ( if (shl->startcol != MAXCOL && v >= (long)shl->startcol && v < (long)shl->endcol) { + int tmp_col = v + MB_PTR2LEN(ptr); + + if (shl->endcol < tmp_col) { + shl->endcol = tmp_col; + } 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/nvim/version.c b/src/nvim/version.c index 9c0188e416..22b7b54019 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -193,7 +193,7 @@ static int included_patches[] = { //548 NA //547, //546, - //545, + 545, //544 NA 543, //542, |