From 07c80f948df52deff38f5b838b4a0dc42b683cdb Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 14 Aug 2021 01:23:43 +0800 Subject: Use proper true or false value for boolean variables In lua, 0 and empty string is true, which is counter-intuitive and different from vim script. So we need to use proper boolean type for vim script global variables, instead of numbers. --- core/globals.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/globals.vim b/core/globals.vim index b1c795f..a89fad6 100644 --- a/core/globals.vim +++ b/core/globals.vim @@ -1,9 +1,9 @@ "{ Global Variable "{{ Custom variables -let g:is_win = has('win32') || has('win64') -let g:is_linux = has('unix') && !has('macunix') -let g:is_mac = has('macunix') +let g:is_win = (has('win32') || has('win64')) ? v:true : v:false +let g:is_linux = (has('unix') && !has('macunix')) ? v:true : v:false +let g:is_mac = has('macunix') ? v:true : v:false "}} "{{ Builtin variables -- cgit v1.2.3