aboutsummaryrefslogtreecommitdiff
path: root/ui.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-10-24 12:10:06 +0800
committerGitHub <noreply@github.com>2019-10-24 12:10:06 +0800
commit09a84d1622f7ed1f9d644c14b8e8bd051e2699fc (patch)
treeec27c1bfbaf642636368e2862948c7863f544f24 /ui.vim
parent0621506858621381f80a6ab6e3ed1160830742da (diff)
Fix true color support issue
Some terminal, for example, xshell, does not support true colors. In this case, we should not set the termguicolors option.
Diffstat (limited to 'ui.vim')
-rw-r--r--ui.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui.vim b/ui.vim
index 64b5c50..021c20a 100644
--- a/ui.vim
+++ b/ui.vim
@@ -4,7 +4,13 @@
" support true colors! For a comprehensive list of terminals supporting true
" colors, see https://github.com/termstandard/colors and
" https://bit.ly/2InF97t)
-set termguicolors
+if exists("&termguicolors")
+ if $TERM == "xterm-256color"
+ set termguicolors
+ else
+ set notermguicolors
+ endif
+endif
" Use dark background
set background=dark