aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/match.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-07-25 10:16:33 +0200
committerbfredl <bjorn.linse@gmail.com>2022-08-17 16:20:39 +0200
commitd879331b0dee66cb106b5bea9efc2f920caf9abd (patch)
tree05188f0b72e9aa7432f2f08516a6f239e491419f /src/nvim/match.c
parentf7cfca49d6f1380b2ec0b0f7723ea308d0810857 (diff)
downloadrneovim-d879331b0dee66cb106b5bea9efc2f920caf9abd.tar.gz
rneovim-d879331b0dee66cb106b5bea9efc2f920caf9abd.tar.bz2
rneovim-d879331b0dee66cb106b5bea9efc2f920caf9abd.zip
feat(ui): allow to set the highlight namespace per window
- reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
Diffstat (limited to 'src/nvim/match.c')
-rw-r--r--src/nvim/match.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/match.c b/src/nvim/match.c
index f085d7cdb4..6cfc7d1f24 100644
--- a/src/nvim/match.c
+++ b/src/nvim/match.c
@@ -11,6 +11,7 @@
#include "nvim/eval/funcs.h"
#include "nvim/ex_docmd.h"
#include "nvim/fold.h"
+#include "nvim/highlight.h"
#include "nvim/highlight_group.h"
#include "nvim/match.h"
#include "nvim/memline.h"
@@ -696,7 +697,7 @@ int update_search_hl(win_T *wp, linenr_T lnum, colnr_T col, char_u **line, match
}
// Highlight the match were the cursor is using the CurSearch
// group.
- if (shl == search_hl && shl->has_cursor && (HL_ATTR(HLF_LC) || wp->w_hl_ids[HLF_LC])) {
+ 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);
} else {
shl->attr_cur = shl->attr;