call lightline#highlight in ColorScheme

This commit is contained in:
Akinori Hattori
2013-08-24 18:30:00 +09:00
parent 4965958548
commit 839ceb3ac2
2 changed files with 6 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/24 13:31:52. " Last Change: 2013/08/24 18:23:47.
" ============================================================================= " =============================================================================
let s:save_cpo = &cpo let s:save_cpo = &cpo
@@ -12,8 +12,9 @@ set cpo&vim
let s:_ = 1 let s:_ = 1
let s:is_win32term = (has('win32') || has('win64')) && !has('gui_running') let s:is_win32term = (has('win32') || has('win64')) && !has('gui_running')
function! lightline#update() function! lightline#update(hi)
if s:_ | call lightline#init() | endif if s:_ | call lightline#init() | endif
if a:hi | call lightline#highlight() | endif
let s = [lightline#statusline(0), lightline#statusline(1)] let s = [lightline#statusline(0), lightline#statusline(1)]
let w = winnr() let w = winnr()
for n in range(1, winnr('$')) for n in range(1, winnr('$'))

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/24 17:18:13. " Last Change: 2013/08/24 18:22:31.
" ============================================================================= " =============================================================================
if exists('g:loaded_lightline') && g:loaded_lightline if exists('g:loaded_lightline') && g:loaded_lightline
@@ -15,7 +15,8 @@ set cpo&vim
augroup LightLine augroup LightLine
autocmd! autocmd!
autocmd WinEnter,BufWinEnter,FileType,ColorScheme * call lightline#update() autocmd ColorScheme * call lightline#update(1)
autocmd WinEnter,BufWinEnter,FileType * call lightline#update(0)
autocmd CursorMoved,BufUnload * call lightline#update_once() autocmd CursorMoved,BufUnload * call lightline#update_once()
augroup END augroup END