mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-16 07:23:49 -05:00
lightline#link has an optional argument (close #17)
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
" Version: 0.0
|
" Version: 0.0
|
||||||
" Author: itchyny
|
" Author: itchyny
|
||||||
" License: MIT License
|
" License: MIT License
|
||||||
" Last Change: 2013/08/28 10:07:44.
|
" Last Change: 2013/08/30 01:07:12.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -81,8 +81,8 @@ function! lightline#mode()
|
|||||||
return get(s:lightline.mode_map, mode(), s:lightline.mode_map['?'])
|
return get(s:lightline.mode_map, mode(), s:lightline.mode_map['?'])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! lightline#link()
|
function! lightline#link(...)
|
||||||
let mode = get(s:lightline._mode_, mode(), 'normal')
|
let mode = get(s:lightline._mode_, a:0 ? a:1 : mode(), 'normal')
|
||||||
for i in range(len(s:lightline.active.left))
|
for i in range(len(s:lightline.active.left))
|
||||||
exec printf('hi link LightLineLeft_active_%d LightLineLeft_%s_%d', i, mode, i)
|
exec printf('hi link LightLineLeft_active_%d LightLineLeft_%s_%d', i, mode, i)
|
||||||
exec printf('hi link LightLineLeft_active_%d_%d LightLineLeft_%s_%d_%d', i, i + 1, mode, i, i + 1)
|
exec printf('hi link LightLineLeft_active_%d_%d LightLineLeft_%s_%d_%d', i, i + 1, mode, i, i + 1)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Version: 0.0
|
|||||||
Author: itchyny (https://github.com/itchyny)
|
Author: itchyny (https://github.com/itchyny)
|
||||||
License: MIT License
|
License: MIT License
|
||||||
Repository: https://github.com/itchyny/lightline.vim
|
Repository: https://github.com/itchyny/lightline.vim
|
||||||
Last Change: 2013/08/29 14:44:34.
|
Last Change: 2013/08/30 01:14:19.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -250,10 +250,10 @@ Exposed functions for lightline.vim.
|
|||||||
lightline#update_once() *lightline#update_once()*
|
lightline#update_once() *lightline#update_once()*
|
||||||
Updates the statuslines only once.
|
Updates the statuslines only once.
|
||||||
|
|
||||||
Following functions are exposed, but users may not need.
|
lightline#link(...) *lightline#link()*
|
||||||
|
|
||||||
lightline#link() *lightline#link()*
|
|
||||||
Creates links of the highlight groups for the active window.
|
Creates links of the highlight groups for the active window.
|
||||||
|
This function accepts an optional argument. It should be one
|
||||||
|
of the return value of |mode()|.
|
||||||
|
|
||||||
lightline#highlight(inactive) *lightline#highlight()*
|
lightline#highlight(inactive) *lightline#highlight()*
|
||||||
Returns |statusline| strings. If the argument is 0, it returns
|
Returns |statusline| strings. If the argument is 0, it returns
|
||||||
|
|||||||
Reference in New Issue
Block a user