From 13fb725403a7c8e46bda9409e4290764b896c4b2 Mon Sep 17 00:00:00 2001 From: itchyny Date: Sat, 23 May 2015 09:10:59 +0900 Subject: [PATCH] improve autoload/lightline.vim: use robust operators --- autoload/lightline/colortable.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lightline/colortable.vim b/autoload/lightline/colortable.vim index b7c0f3c..82617b2 100644 --- a/autoload/lightline/colortable.vim +++ b/autoload/lightline/colortable.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline/colortable.vim " Author: itchyny " License: MIT License -" Last Change: 2014/12/17 00:13:56. +" Last Change: 2015/03/29 06:21:39. " ============================================================================= let s:save_cpo = &cpo @@ -12,7 +12,7 @@ function! s:load() abort let rgbfile = $VIMRUNTIME . '/rgb.txt' let table = {} if filereadable(rgbfile) - for _ in map(filter(readfile(rgbfile), 'v:val !~ "^!"'), 'matchlist(v:val, "^\\s*\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(.*\\)")[1:4]') + for _ in map(filter(readfile(rgbfile), 'v:val !~# "^!"'), 'matchlist(v:val, "^\\s*\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(\\d\\+\\)\\s\\+\\(.*\\)")[1:4]') let table[tolower(_[3])] = _[0:2] endfor endif