diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-30 15:40:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-30 15:40:48 +0200 |
commit | 60a68362aa73f4a6cb534688978f9dc2b16e60fe (patch) | |
tree | 0778d5cc682a5a11b459d5c95a56d36f00cfbbce /src/fileio.c | |
parent | 0e9d1ae3216a5940b36bb56d155fb300b2e55b00 (diff) | |
download | vim-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/fileio.c')
-rw-r--r-- | src/fileio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 6b48c39d3..63cc61c43 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -7734,6 +7734,7 @@ static struct event_name {"CmdwinLeave", EVENT_CMDWINLEAVE}, {"CmdUndefined", EVENT_CMDUNDEFINED}, {"ColorScheme", EVENT_COLORSCHEME}, + {"ColorSchemePre", EVENT_COLORSCHEMEPRE}, {"CompleteDone", EVENT_COMPLETEDONE}, {"CursorHold", EVENT_CURSORHOLD}, {"CursorHoldI", EVENT_CURSORHOLDI}, @@ -9479,7 +9480,8 @@ apply_autocmds_group( */ if (fname_io == NULL) { - if (event == EVENT_COLORSCHEME || event == EVENT_OPTIONSET) + if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE + || event == EVENT_OPTIONSET) autocmd_fname = NULL; else if (fname != NULL && !ends_excmd(*fname)) autocmd_fname = fname; @@ -9549,6 +9551,7 @@ apply_autocmds_group( || event == EVENT_SPELLFILEMISSING || event == EVENT_QUICKFIXCMDPRE || event == EVENT_COLORSCHEME + || event == EVENT_COLORSCHEMEPRE || event == EVENT_OPTIONSET || event == EVENT_QUICKFIXCMDPOST || event == EVENT_DIRCHANGED) |