From a74f73043be2eb355e96311f5a4d01a915e024fe Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 6 Nov 2017 09:41:52 +1300 Subject: Make background detection return not set value This approach allows more flexibility from the caller's side. --- vim/config/syntax.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vim/config/syntax.vim') 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 -- cgit v1.2.3