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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user