Make g:CSApprox_loaded prevent warning when -gui

This commit is contained in:
Matt Wozniski 2009-11-02 22:07:09 -05:00
parent 347cc66837
commit cdde3b6ade

View File

@ -54,20 +54,15 @@
" Quit if the user doesn't want or need us or is missing the gui feature. We " Quit if the user doesn't want or need us or is missing the gui feature. We
" need +gui to be able to check the gui color settings; vim doesn't bother to " need +gui to be able to check the gui color settings; vim doesn't bother to
" store them if it is not built with +gui. " store them if it is not built with +gui.
if !has('gui') || exists('g:CSApprox_loaded') if exists('g:CSApprox_loaded')
" XXX This depends upon knowing the default for g:CSApprox_verbose_level finish
let s:verbose = 1 elseif ! has('gui')
if exists("g:CSApprox_verbose_level") " Warn unless the user set g:CSApprox_verbose_level to zero.
let s:verbose = g:CSApprox_verbose_level if get(g:, 'CSApprox_verbose_level', 1)
endif
if ! has('gui') && s:verbose > 0
echomsg "CSApprox needs gui support - not loading." echomsg "CSApprox needs gui support - not loading."
echomsg " See :help |csapprox-+gui| for possible workarounds." echomsg " See :help |csapprox-+gui| for possible workarounds."
endif endif
unlet s:verbose
finish finish
endif endif