forked from aniani/vim
patch 8.2.2611: conditions for startup tests are not exactly right
Problem: Conditions for startup tests are not exactly right.
Solution: Check for type of GUI instead of MS-Windows. (Ozaki Kiichi,
closes #7976)
This commit is contained in:
@@ -199,4 +199,29 @@ func CheckNotAsan()
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Command to check for satisfying any of the conditions.
|
||||
" e.g. CheckAnyOf Feature:bsd Feature:sun Linux
|
||||
command -nargs=+ CheckAnyOf call CheckAnyOf(<f-args>)
|
||||
func CheckAnyOf(...)
|
||||
let excp = []
|
||||
for arg in a:000
|
||||
try
|
||||
exe 'Check' .. substitute(arg, ':', ' ', '')
|
||||
return
|
||||
catch /^Skipped:/
|
||||
let excp += [substitute(v:exception, '^Skipped:\s*', '', '')]
|
||||
endtry
|
||||
endfor
|
||||
throw 'Skipped: ' .. join(excp, '; ')
|
||||
endfunc
|
||||
|
||||
" Command to check for satisfying all of the conditions.
|
||||
" e.g. CheckAllOf Unix Gui Option:ballooneval
|
||||
command -nargs=+ CheckAllOf call CheckAllOf(<f-args>)
|
||||
func CheckAllOf(...)
|
||||
for arg in a:000
|
||||
exe 'Check' .. substitute(arg, ':', ' ', '')
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user