aboutsummaryrefslogtreecommitdiff
path: root/vim/config/syntax.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 09:41:52 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 09:41:52 +1300
commita74f73043be2eb355e96311f5a4d01a915e024fe (patch)
tree53d8c476935fd587a245bb627158894610fd5c59 /vim/config/syntax.vim
parentComplete ToggleOptionFlag commands with opt names (diff)
downloaddotfiles-a74f73043be2eb355e96311f5a4d01a915e024fe.tar.gz
dotfiles-a74f73043be2eb355e96311f5a4d01a915e024fe.zip
Make background detection return not set value
This approach allows more flexibility from the caller's side.
Diffstat (limited to 'vim/config/syntax.vim')
-rw-r--r--vim/config/syntax.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/config/syntax.vim b/vim/config/syntax.vim
index 8cb1228b..f1116528 100644
--- a/vim/config/syntax.vim
+++ b/vim/config/syntax.vim
@@ -5,9 +5,11 @@ if has('syntax')
silent! syntax enable
silent! syntax sync minlines=100
- " If we can, detect a light background, but default to a dark one
+ " If we can, detect a light background, but default to a dark one. This is
+ " only because it's more likely the author of this configuration will be
+ " using one.
if has('eval') && v:version >= 701
- silent! call detect_background#DetectBackground()
+ silent! let &background = detect_background#DetectBackground()
else
set background=dark
endif