diff --git a/README.md b/README.md index 4d8b1fd..7d6b2dc 100644 --- a/README.md +++ b/README.md @@ -439,7 +439,7 @@ endfunction Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline) ```vim function! MyFugitive() - return exists('*fugitive#head') && len(fugitive#head()) ? '⭠ '.fugitive#head() : '' + return exists('*fugitive#head') && strlen(fugitive#head()) ? '⭠ '.fugitive#head() : '' endfunction ``` ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/15.png) @@ -498,7 +498,7 @@ function! MyFilename() endfunction 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 function! MyFileformat() diff --git a/doc/lightline.txt b/doc/lightline.txt index d4f0fe9..4c4616c 100644 --- a/doc/lightline.txt +++ b/doc/lightline.txt @@ -4,7 +4,7 @@ Version: 0.0 Author: itchyny (https://github.com/itchyny) License: MIT License 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* @@ -144,7 +144,7 @@ nice. return &readonly ? '' : '' endfunction function! MyFugitive() - return exists("*fugitive#head") && len(fugitive#head()) ? ''.fugitive#head() : '' + return exists("*fugitive#head") && strlen(fugitive#head()) ? ''.fugitive#head() : '' endfunction < If you have installed the patched font for |vim-powerline|, following settings @@ -165,7 +165,7 @@ look nice. return &readonly ? '⭤' : '' endfunction function! MyFugitive() - return exists("*fugitive#head") && len(fugitive#head()) ? '⭠ '.fugitive#head() : '' + return exists("*fugitive#head") && strlen(fugitive#head()) ? '⭠ '.fugitive#head() : '' endfunction < @@ -265,7 +265,7 @@ A nice example for |vim-powerline| font users: \ ('' != MyModified() ? ' ' . MyModified() : '') endfunction 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 < ------------------------------------------------------------------------------