From 55ac4371fa270ebae7eae748f9f90a80d10d2a9f Mon Sep 17 00:00:00 2001 From: Johann Rudloff Date: Sat, 18 Apr 2020 12:10:30 +0200 Subject: [PATCH] Only add the "GUIEnter" autocommand, if the GUI is not already active. 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. --- colors/NeoSolarized.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/colors/NeoSolarized.vim b/colors/NeoSolarized.vim index ec7de80..e07a579 100644 --- a/colors/NeoSolarized.vim +++ b/colors/NeoSolarized.vim @@ -917,7 +917,9 @@ endif " mode (detected with the script scope s:vmode variable). It also allows for " other potential terminal customizations that might make gui mode suboptimal. " -autocmd GUIEnter * if (has('gui_running')) | exe "colorscheme " . g:colors_name | endif +if !has('gui_running') + autocmd GUIEnter * if (has('gui_running')) | exe "colorscheme " . g:colors_name | endif +endif "}}} " License "{{{