From 5ea9ec2169b247bdfc3f1f4ed4c9ecbda44544b1 Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Sun, 2 May 2010 21:38:35 -0400 Subject: [PATCH] Change the test for complaining about t_Co != 256 Before, this test would be short-circuited only if gvim was running. This caused vim to still complain when run as "vim -r" (which apparently loads plugins, presumably to set up the proper 'directory' path...). So, I've changed the short circuiting to happen whenever t_Co is the empty string, which happens to be true both for gvim (which understandably doesn't do the terminal initialization stuff) and for vim -r (which largely inexplicably skips terminal initialization). --- plugin/CSApprox.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/CSApprox.vim b/plugin/CSApprox.vim index 664058f..ac48f40 100644 --- a/plugin/CSApprox.vim +++ b/plugin/CSApprox.vim @@ -665,7 +665,7 @@ endfunction function! s:CSApproxImpl() " Return if not running in an 88/256 color terminal if &t_Co != 256 && &t_Co != 88 - if &verbose && !has('gui_running') + if &verbose && &t_Co != '' echomsg "CSApprox skipped; terminal only has" &t_Co "colors, not 88/256" echomsg "Try checking :help csapprox-terminal for workarounds" endif