mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-13 14:03:51 -05:00
rename uniq to unique
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
" Filename: autoload/lightline.vim
|
||||
" Author: itchyny
|
||||
" License: MIT License
|
||||
" Last Change: 2016/03/24 08:46:19.
|
||||
" Last Change: 2016/03/24 20:58:46.
|
||||
" =============================================================================
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
@@ -255,7 +255,7 @@ function! s:term(l) abort
|
||||
return len(a:l) == 5 && type(a:l[4]) == 1 && strlen(a:l[4]) ? 'term='.a:l[4].' cterm='.a:l[4].' gui='.a:l[4] : ''
|
||||
endfunction
|
||||
|
||||
function! s:uniq(l) abort
|
||||
function! s:unique(l) abort
|
||||
let [l,i,s] = [a:l,0,{}]
|
||||
while i < len(l)
|
||||
let k = string(l[i])
|
||||
@@ -281,7 +281,7 @@ function! lightline#highlight(...) abort
|
||||
endif
|
||||
let [s:lightline.llen, s:lightline.rlen] = [len(c.normal.left), len(c.normal.right)]
|
||||
let [s:lightline.tab_llen, s:lightline.tab_rlen] = [len(has_key(c,'tabline') && has_key(c.tabline, 'left') ? c.tabline.left : c.normal.left), len(has_key(c,'tabline') && has_key(c.tabline, 'right') ? c.tabline.right : c.normal.right)]
|
||||
let h = s:uniq(filter(copy(values(g)), 'v:val !=# "raw"'))
|
||||
let h = s:unique(filter(copy(values(g)), 'v:val !=# "raw"'))
|
||||
let modes = a:0 ? [a:1] : extend(['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select', 'tabline'], has('nvim') ? ['terminal'] : [])
|
||||
for mode in modes
|
||||
let s:highlight[mode] = 1
|
||||
|
||||
Reference in New Issue
Block a user