aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/match.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-23 21:36:32 +0800
committerGitHub <noreply@github.com>2023-07-23 21:36:32 +0800
commit59289fb987bd51b072f91ae0de8ee8515bf07e21 (patch)
tree807ca667f23e0fda30bdb99626b14c094cd4c52a /src/nvim/match.c
parent183147a906fcf352e393dea546e7a683f7c068c3 (diff)
downloadrneovim-59289fb987bd51b072f91ae0de8ee8515bf07e21.tar.gz
rneovim-59289fb987bd51b072f91ae0de8ee8515bf07e21.tar.bz2
rneovim-59289fb987bd51b072f91ae0de8ee8515bf07e21.zip
fix(highlight): make CurSearch work properly with 'winhl' (#24448)
Diffstat (limited to 'src/nvim/match.c')
-rw-r--r--src/nvim/match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/match.c b/src/nvim/match.c
index ece4de2199..d0e7fe0ef9 100644
--- a/src/nvim/match.c
+++ b/src/nvim/match.c
@@ -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;
}