mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +00:00
vim-patch:8.0.1777: cannot cleanup before loading another colorscheme (#9104)
Problem: Cannot cleanup before loading another colorscheme.
Solution: Add the ColorSchemePre autocommand event.
60a68362aa
This commit is contained in:

committed by
Justin M. Keyes

parent
e17e21e4cf
commit
2bf1aa5628
@@ -6779,7 +6779,9 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
|
||||
* invalid.
|
||||
*/
|
||||
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;
|
||||
@@ -6830,6 +6832,7 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
|
||||
sfname = vim_strsave(fname);
|
||||
// Don't try expanding the following events.
|
||||
if (event == EVENT_COLORSCHEME
|
||||
|| event == EVENT_COLORSCHEMEPRE
|
||||
|| event == EVENT_DIRCHANGED
|
||||
|| event == EVENT_FILETYPE
|
||||
|| event == EVENT_FUNCUNDEFINED
|
||||
|
Reference in New Issue
Block a user