fix(highlight): make CurSearch work properly with 'winhl' (#24448)

This commit is contained in:
zeertzjq
2023-07-23 21:36:32 +08:00
committed by GitHub
parent 183147a906
commit 59289fb987
4 changed files with 27 additions and 6 deletions

View File

@@ -716,8 +716,8 @@ int update_search_hl(win_T *wp, linenr_T lnum, colnr_T col, char **line, match_T
}
// Highlight the match were the cursor is using the CurSearch
// group.
if (shl == search_hl && shl->has_cursor && (HL_ATTR(HLF_LC) || win_hl_attr(wp, HLF_LC))) {
shl->attr_cur = win_hl_attr(wp, HLF_LC) ? win_hl_attr(wp, HLF_LC) : HL_ATTR(HLF_LC);
if (shl == search_hl && shl->has_cursor) {
shl->attr_cur = win_hl_attr(wp, HLF_LC);
} else {
shl->attr_cur = shl->attr;
}