mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-17 07:53:41 -05:00
move palette conversion for Windows to colortable.vim
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
" Filename: autoload/lightline/colortable.vim
|
||||
" Author: itchyny
|
||||
" License: MIT License
|
||||
" Last Change: 2015/03/29 06:21:39.
|
||||
" Last Change: 2020/06/19 11:07:13.
|
||||
" =============================================================================
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
@@ -38,5 +38,15 @@ function! lightline#colortable#gui2cui(rgb, fallback) abort
|
||||
return rgb[0] + rgb[1] + rgb[2]
|
||||
endfunction
|
||||
|
||||
function! lightline#colortable#gui2cui_palette(palette) abort
|
||||
for u in values(a:palette)
|
||||
for v in values(u)
|
||||
for w in v
|
||||
let [w[2], w[3]] = [lightline#colortable#gui2cui(w[0], w[2]), lightline#colortable#gui2cui(w[1], w[3])]
|
||||
endfor
|
||||
endfor
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
Reference in New Issue
Block a user