From 7413b2464bc2ea8d8c1951a23fdfe1c2d8e8a9e3 Mon Sep 17 00:00:00 2001 From: itchyny Date: Tue, 23 Jun 2015 22:34:23 +0900 Subject: [PATCH] fix autoload/lightline.vim: fix indexing for raw type --- autoload/lightline.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 4f18b19..f2c3008 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2015/03/01 10:51:32. +" Last Change: 2015/06/23 22:33:07. " ============================================================================= let s:save_cpo = &cpo @@ -357,7 +357,7 @@ function! s:line(tabline, inactive) abort let _ .= printf('%%#LightLineLeft_%s_%s#', mode, ll[i]) for j in range(len(lt[i])) let x = substitute('%( '.(lc[i][j] ? lt[i][j] : has_key(f,lt[i][j])?'%{exists("*'.f[lt[i][j]].'")?'.f[lt[i][j]].'():""}':get(c,lt[i][j],'')).' %)', '^%( %)', '', '') - let _ .= has_key(t,lt[i][j])&&t[lt[i][j]]==#'raw'&&strlen(x)>7 ? x[3:-2] : x + let _ .= has_key(t,lt[i][j])&&t[lt[i][j]]==#'raw'&&strlen(x)>7 ? x[3:-4] : x if j < len(lt[i]) - 1 | let _ .= s:subseparator(lt[i][j], lt[i][j+1:], s.left, lc[i][j], lc[i][j+1:]) | endif endfor let _ .= printf('%%#LightLineLeft_%s_%s_%s#', mode, ll[i], ll[i + 1]) . (i < l + len(lt) - len(l_) && ll[i] < l || type(ll[i]) != type(ll[i + 1]) || type(ll[i]) && type(ll[i + 1]) && ll[i] != ll[i + 1] ? p.left : len(lt[i]) ? s.left : '')