mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-16 07:23:49 -05:00
use constant values for type(''), type({})
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
" Filename: autoload/lightline.vim
|
" Filename: autoload/lightline.vim
|
||||||
" Author: itchyny
|
" Author: itchyny
|
||||||
" License: MIT License
|
" License: MIT License
|
||||||
" Last Change: 2016/04/17 12:51:55.
|
" Last Change: 2016/04/17 13:49:56.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -144,7 +144,7 @@ let s:_lightline = {
|
|||||||
function! lightline#init() abort
|
function! lightline#init() abort
|
||||||
let s:lightline = deepcopy(get(g:, 'lightline', {}))
|
let s:lightline = deepcopy(get(g:, 'lightline', {}))
|
||||||
for [key, value] in items(s:_lightline)
|
for [key, value] in items(s:_lightline)
|
||||||
if type(value) == type({})
|
if type(value) == 4
|
||||||
if !has_key(s:lightline, key)
|
if !has_key(s:lightline, key)
|
||||||
let s:lightline[key] = {}
|
let s:lightline[key] = {}
|
||||||
endif
|
endif
|
||||||
@@ -328,7 +328,7 @@ endfunction
|
|||||||
function! s:evaluate_expand(component) abort
|
function! s:evaluate_expand(component) abort
|
||||||
try
|
try
|
||||||
let result = eval(a:component . '()')
|
let result = eval(a:component . '()')
|
||||||
if type(result) == type('') && result ==# ''
|
if type(result) == 1 && result ==# ''
|
||||||
return []
|
return []
|
||||||
endif
|
endif
|
||||||
catch
|
catch
|
||||||
|
|||||||
Reference in New Issue
Block a user