From ba2fba970776a5d4b2139f53f48981ca7d0f2f71 Mon Sep 17 00:00:00 2001 From: itchyny Date: Sun, 17 Apr 2016 13:51:00 +0900 Subject: [PATCH] use constant values for type(''), type({}) --- autoload/lightline.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 4d6fe22..2b8ce9e 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2016/04/17 12:51:55. +" Last Change: 2016/04/17 13:49:56. " ============================================================================= let s:save_cpo = &cpo @@ -144,7 +144,7 @@ let s:_lightline = { function! lightline#init() abort let s:lightline = deepcopy(get(g:, 'lightline', {})) for [key, value] in items(s:_lightline) - if type(value) == type({}) + if type(value) == 4 if !has_key(s:lightline, key) let s:lightline[key] = {} endif @@ -328,7 +328,7 @@ endfunction function! s:evaluate_expand(component) abort try let result = eval(a:component . '()') - if type(result) == type('') && result ==# '' + if type(result) == 1 && result ==# '' return [] endif catch