Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use correct $TERM env. var. under Linux #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions colors/solarized.vim
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,15 @@ let s:terms_noitalic=[
\"iTerm.app",
\"Apple_Terminal"
\]

let s:term_env_var = has('unix') ? $TERM : $TERM_PROGRAM

if has("gui_running")
let s:terminal_italic=1 " TODO: could refactor to not require this at all
else
let s:terminal_italic=0 " terminals will be guilty until proven compatible
for term in s:terms_italic
if $TERM_PROGRAM =~ term
if s:term_env_var =~ term
let s:terminal_italic=1
endif
endfor
Expand Down Expand Up @@ -205,7 +208,7 @@ function! s:SetOption(name,default)
endif
endfunction

if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256)
if (s:term_env_var ==? "apple_terminal" && &t_Co < 256)
let s:solarized_termtrans_default = 1
else
let s:solarized_termtrans_default = 0
Expand Down