aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-17 23:58:43 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-17 23:58:43 +1200
commitfd6065b19b4da998c417a70fdd0f097ae5526230 (patch)
tree4a52e86cd6e21f76491193ddd63f3dc35f393469
parentAdjust comment (diff)
downloaddotfiles-fd6065b19b4da998c417a70fdd0f097ae5526230.tar.gz
dotfiles-fd6065b19b4da998c417a70fdd0f097ae5526230.zip
Check for sahara.vim suitability more carefully
-rw-r--r--vim/vimrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 69bf6e3d..10a3aafb 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1012,10 +1012,12 @@ if !exists('$COLORFGBG') && get(v:, 'termrbgresp', '') ==# ''
set background=dark
endif
-" If the background seems to be dark, and my custom sahara.vim color scheme
-" looks to be available, load it.
+" If the background seems to be dark, and I have either the GUI or a 256 color
+" terminal, and my custom sahara.vim color scheme looks to be available, load
+" it.
"
if &background ==# 'dark'
+ \ && (has('gui_running') || &t_Co >= 256)
\ && globpath(&runtimepath, 'colors/sahara.vim') !=# ''
colorscheme sahara
endif