0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 8.2.5047: CurSearch highlight is often wrong

Problem:    CurSearch highlight is often wrong.
Solution:   Remember the last highlighted position and redraw when needed.
This commit is contained in:
Bram Moolenaar
2022-05-31 13:43:12 +01:00
parent 4aaf3e7f4d
commit 368137aa52
7 changed files with 49 additions and 6 deletions

View File

@@ -798,7 +798,11 @@ update_search_hl(
// Highlight the match were the cursor is using the CurSearch
// group.
if (shl == search_hl && shl->has_cursor)
{
shl->attr_cur = HL_ATTR(HLF_LC);
if (shl->attr_cur != shl->attr)
search_hl_has_cursor_lnum = lnum;
}
}
else if (col == shl->endcol)