mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-15 15:03:51 -05:00
use strlen instead of len
This commit is contained in:
@@ -439,7 +439,7 @@ endfunction
|
|||||||
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
|
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
|
||||||
```vim
|
```vim
|
||||||
function! MyFugitive()
|
function! MyFugitive()
|
||||||
return exists('*fugitive#head') && len(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
return exists('*fugitive#head') && strlen(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
||||||
endfunction
|
endfunction
|
||||||
```
|
```
|
||||||

|

|
||||||
@@ -498,7 +498,7 @@ function! MyFilename()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! MyFugitive()
|
function! MyFugitive()
|
||||||
return &ft !~? 'vimfiler\|gundo' && exists('*fugitive#head') && len(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
return &ft !~? 'vimfiler\|gundo' && exists('*fugitive#head') && strlen(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! MyFileformat()
|
function! MyFileformat()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Version: 0.0
|
|||||||
Author: itchyny (https://github.com/itchyny)
|
Author: itchyny (https://github.com/itchyny)
|
||||||
License: MIT License
|
License: MIT License
|
||||||
Repository: https://github.com/itchyny/lightline.vim
|
Repository: https://github.com/itchyny/lightline.vim
|
||||||
Last Change: 2013/08/24 01:05:30.
|
Last Change: 2013/08/25 17:00:30.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ nice.
|
|||||||
return &readonly ? '' : ''
|
return &readonly ? '' : ''
|
||||||
endfunction
|
endfunction
|
||||||
function! MyFugitive()
|
function! MyFugitive()
|
||||||
return exists("*fugitive#head") && len(fugitive#head()) ? ''.fugitive#head() : ''
|
return exists("*fugitive#head") && strlen(fugitive#head()) ? ''.fugitive#head() : ''
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
If you have installed the patched font for |vim-powerline|, following settings
|
If you have installed the patched font for |vim-powerline|, following settings
|
||||||
@@ -165,7 +165,7 @@ look nice.
|
|||||||
return &readonly ? '⭤' : ''
|
return &readonly ? '⭤' : ''
|
||||||
endfunction
|
endfunction
|
||||||
function! MyFugitive()
|
function! MyFugitive()
|
||||||
return exists("*fugitive#head") && len(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
return exists("*fugitive#head") && strlen(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ A nice example for |vim-powerline| font users:
|
|||||||
\ ('' != MyModified() ? ' ' . MyModified() : '')
|
\ ('' != MyModified() ? ' ' . MyModified() : '')
|
||||||
endfunction
|
endfunction
|
||||||
function! MyFugitive()
|
function! MyFugitive()
|
||||||
return &ft !~? 'vimfiler' && exists("*fugitive#head") && len(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
return &ft !~? 'vimfiler' && exists("*fugitive#head") && strlen(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user