0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.1777: cannot cleanup before loading another colorscheme

Problem:    Cannot cleanup before loading another colorscheme.
Solution:   Add the ColorSchemePre autocommand event.
This commit is contained in:
Bram Moolenaar
2018-04-30 15:40:48 +02:00
parent 0e9d1ae321
commit 60a68362aa
6 changed files with 31 additions and 2 deletions

View File

@@ -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);