mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
vim-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.
368137aa52
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -706,6 +706,9 @@ int update_search_hl(win_T *wp, linenr_T lnum, colnr_T col, char **line, match_T
|
||||
// group.
|
||||
if (shl == search_hl && shl->has_cursor) {
|
||||
shl->attr_cur = win_hl_attr(wp, HLF_LC);
|
||||
if (shl->attr_cur != shl->attr) {
|
||||
search_hl_has_cursor_lnum = lnum;
|
||||
}
|
||||
} else {
|
||||
shl->attr_cur = shl->attr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user