Fix trigger colorscheme autocommand (#23)

Some plugins like vim-coc rely on the colorscheme autocommand to apply their overrides to themes. Because we're using `execute` instead of calling `colorscheme` directly, we have to manually trigger the event.
This commit is contained in:
Joey Baker
2020-09-24 02:18:46 -07:00
committed by GitHub
parent 9ef9d29705
commit 1df055e348

View File

@@ -166,11 +166,13 @@ function! thematic#init(mode) abort
let l:cs = get(l:th, 'colorscheme', l:theme_name)
try
execute 'colorscheme ' . l:cs
doautoall colorscheme
catch /E185:/
" no colorscheme matching the theme name, so fall back to original, if any
if has_key(g:thematic#original, 'colorscheme')
let l:cs = g:thematic#original.colorscheme
execute 'colorscheme ' . l:cs
doautoall colorscheme
endif
endtry