aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 2b74c45478..db10b71d38 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -27,6 +27,7 @@
#include "nvim/highlight.h"
#include "nvim/indent_c.h"
#include "nvim/keymap.h"
+#include "nvim/lua/executor.h"
#include "nvim/macros.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
@@ -6919,6 +6920,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
hlgroup->sg_deflink = to_id;
hlgroup->sg_deflink_sctx = current_sctx;
hlgroup->sg_deflink_sctx.sc_lnum += sourcing_lnum;
+ nlua_set_sctx(&hlgroup->sg_deflink_sctx);
}
}
@@ -6939,6 +6941,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
hlgroup->sg_link = to_id;
hlgroup->sg_script_ctx = current_sctx;
hlgroup->sg_script_ctx.sc_lnum += sourcing_lnum;
+ nlua_set_sctx(&hlgroup->sg_script_ctx);
hlgroup->sg_cleared = false;
redraw_all_later(SOME_VALID);
@@ -7319,6 +7322,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
}
HL_TABLE()[idx].sg_script_ctx = current_sctx;
HL_TABLE()[idx].sg_script_ctx.sc_lnum += sourcing_lnum;
+ nlua_set_sctx(&HL_TABLE()[idx].sg_script_ctx);
}
xfree(key);
xfree(arg);