mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-12 21:43:50 -05:00
update s:line: add the subseparator only when it is no empty
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/05/13 23:30:54.
|
" Last Change: 2016/05/14 13:20:45.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -403,7 +403,7 @@ function! s:line(tabline, inactive) abort
|
|||||||
for j in range(len(lt[i]))
|
for j in range(len(lt[i]))
|
||||||
let x = lc[i][j] ? lt[i][j] : has_key(f, lt[i][j]) ? (exists('*' . f[lt[i][j]]) ? '%{' . f[lt[i][j]] . '()}' : '%{exists("*' . f[lt[i][j]] . '")?' . f[lt[i][j]] . '():""}') : get(c, lt[i][j], '')
|
let x = lc[i][j] ? lt[i][j] : has_key(f, lt[i][j]) ? (exists('*' . f[lt[i][j]]) ? '%{' . 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' || x ==# '' ? x : '%( ' . x . ' %)'
|
let _ .= has_key(t, lt[i][j]) && t[lt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)'
|
||||||
if j < len(lt[i]) - 1
|
if j < len(lt[i]) - 1 && s.left !=# ''
|
||||||
let _ .= s:subseparator(lt[i][(j):], s.left, lc[i][(j):])
|
let _ .= s:subseparator(lt[i][(j):], s.left, lc[i][(j):])
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
@@ -418,7 +418,7 @@ function! s:line(tabline, inactive) abort
|
|||||||
for j in range(len(rt[i]))
|
for j in range(len(rt[i]))
|
||||||
let x = rc[i][j] ? rt[i][j] : has_key(f, rt[i][j]) ? (exists('*' . f[rt[i][j]]) ? '%{' . f[rt[i][j]] . '()}' : '%{exists("*' . f[rt[i][j]] . '")?' . f[rt[i][j]] . '():""}') : get(c, rt[i][j], '')
|
let x = rc[i][j] ? rt[i][j] : has_key(f, rt[i][j]) ? (exists('*' . f[rt[i][j]]) ? '%{' . f[rt[i][j]] . '()}' : '%{exists("*' . f[rt[i][j]] . '")?' . f[rt[i][j]] . '():""}') : get(c, rt[i][j], '')
|
||||||
let _ .= has_key(t, rt[i][j]) && t[rt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)'
|
let _ .= has_key(t, rt[i][j]) && t[rt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)'
|
||||||
if j < len(rt[i]) - 1
|
if j < len(rt[i]) - 1 && s.right !=# ''
|
||||||
let _ .= s:subseparator(rt[i][(j):], s.right, rc[i][(j):])
|
let _ .= s:subseparator(rt[i][(j):], s.right, rc[i][(j):])
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
Reference in New Issue
Block a user