aboutsummaryrefslogtreecommitdiff
path: root/ui.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-10-26 17:23:24 +0800
committerGitHub <noreply@github.com>2019-10-26 17:23:24 +0800
commit35a4fffe9d702eba16dd7a5c392434b7e6c6708c (patch)
tree3126520e79329228bbebf4e0c4e9252f49d94396 /ui.vim
parentb088f7adb88087cc2aeb6b7872ed51a5a9fae444 (diff)
Fix a bug about termguicolors
If we use nvim-qt, the TERM env variable may be empty. We should check if we are using the GUI.
Diffstat (limited to 'ui.vim')
-rw-r--r--ui.vim5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui.vim b/ui.vim
index 021c20a..2c00558 100644
--- a/ui.vim
+++ b/ui.vim
@@ -2,10 +2,9 @@
"{{ General settings about colors
" Enable true colors support (Do not use this option if your terminal does not
" support true colors! For a comprehensive list of terminals supporting true
-" colors, see https://github.com/termstandard/colors and
-" https://bit.ly/2InF97t)
+" colors, see https://github.com/termstandard/colors and https://bit.ly/2InF97t.
if exists("&termguicolors")
- if $TERM == "xterm-256color"
+ if $TERM == "xterm-256color" || exists('g:GuiLoaded')
set termguicolors
else
set notermguicolors