From 9927b230dd5ae7004f4d14ea9f684d06cd11a856 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 6 Nov 2017 09:51:09 +1300 Subject: Don't use VimL ==# for number comparisons The Google VimScript Guide says: > Always use case-explicit operators for strings (=~# and =~?, never =~). > > This also applies to !~ == != > >= < and <= > This only applies for strings. == and >= are fine for numbers, but ==# > and >=# must be used for strings. --- vim/autoload/detect_background.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vim/autoload') diff --git a/vim/autoload/detect_background.vim b/vim/autoload/detect_background.vim index 9758f8d3..c010dc53 100644 --- a/vim/autoload/detect_background.vim +++ b/vim/autoload/detect_background.vim @@ -28,8 +28,8 @@ function! detect_background#DetectBackground() abort " Choose the background setting based on this value if l:bg ==# 'default' - \ || l:bg ==# '7' - \ || l:bg ==# '15' + \ || l:bg == 7 + \ || l:bg == 15 return 'light' else return 'dark' -- cgit v1.2.3