overcache / NeoSolarized

NeoSolarized: A fixed solarized colorscheme for better truecolor support.
MIT License
517 stars 99 forks source link

Only add the "GUIEnter" autocommand if the GUI is not already active. #23

Open cypheon opened 4 years ago

cypheon commented 4 years ago

In case the GUI is already loaded, the autocommand is definitely not needed and may in some cases lead to overwriting manual changes to the highlighting groups.

For example, when using VimR, the GUIEnter autocommand is triggered after the ColorScheme autocommands, which means that the colorscheme is reloaded. This prevents the user from overriding single highlight groups in .vimrc like autocmd VimEnter,Colorscheme * :hi Cursor guibg=#ff0000