summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-30 15:40:48 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-30 15:40:48 +0200
commit60a68362aa73f4a6cb534688978f9dc2b16e60fe (patch)
tree0778d5cc682a5a11b459d5c95a56d36f00cfbbce /src/syntax.c
parent0e9d1ae3216a5940b36bb56d155fb300b2e55b00 (diff)
downloadvim-git-60a68362aa73f4a6cb534688978f9dc2b16e60fe.tar.gz
patch 8.0.1777: cannot cleanup before loading another colorschemev8.0.1777
Problem: Cannot cleanup before loading another colorscheme. Solution: Add the ColorSchemePre autocommand event.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index e945dac04..bb695b573 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -7224,6 +7224,8 @@ load_colors(char_u *name)
buf = alloc((unsigned)(STRLEN(name) + 12));
if (buf != NULL)
{
+ apply_autocmds(EVENT_COLORSCHEMEPRE, name,
+ curbuf->b_fname, FALSE, curbuf);
sprintf((char *)buf, "colors/%s.vim", name);
retval = source_runtime(buf, DIP_START + DIP_OPT);
vim_free(buf);