Skip to content

Commit

Permalink
improve autoload/lightline.vim: down-convert colors only when &t_Co <…
Browse files Browse the repository at this point in the history
… 256
  • Loading branch information
itchyny committed Mar 1, 2015
1 parent 6e25afe commit 387606e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/lightline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
" Version: 0.0
" Author: itchyny
" License: MIT License
" Last Change: 2015/01/17 12:52:19.
" Last Change: 2015/03/01 10:51:32.
" =============================================================================

let s:save_cpo = &cpo
Expand Down Expand Up @@ -207,7 +207,7 @@ endfunction

function! lightline#highlight(...) abort
let [c, f, g] = [s:lightline.palette, s:lightline.mode_fallback, s:lightline.component_type]
if (has('win32') || has('win64')) && !has('gui_running')
if (has('win32') || has('win64')) && !has('gui_running') && &t_Co < 256
for u in values(c)
for v in values(u)
for _ in v | let [_[2], _[3]] = [lightline#colortable#gui2cui(_[0], _[2]), lightline#colortable#gui2cui(_[1], _[3])] | endfor
Expand Down

0 comments on commit 387606e

Please sign in to comment.