mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-12 21:43:50 -05:00
replace fugitive#head with FugitiveHead in the documents (close #417)
This commit is contained in:
@@ -246,7 +246,7 @@ let g:lightline = {
|
|||||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
||||||
\ },
|
\ },
|
||||||
\ 'component_function': {
|
\ 'component_function': {
|
||||||
\ 'gitbranch': 'fugitive#head'
|
\ 'gitbranch': 'FugitiveHead'
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Version: 0.1
|
|||||||
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: 2019/12/27 18:23:29.
|
Last Change: 2020/01/28 18:40:21.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ OPTIONS *lightline-option*
|
|||||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
||||||
\ },
|
\ },
|
||||||
\ 'component_function': {
|
\ 'component_function': {
|
||||||
\ 'gitbranch': 'fugitive#head'
|
\ 'gitbranch': 'FugitiveHead'
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
<
|
<
|
||||||
@@ -316,8 +316,8 @@ nice.
|
|||||||
return &readonly ? '' : ''
|
return &readonly ? '' : ''
|
||||||
endfunction
|
endfunction
|
||||||
function! LightlineFugitive()
|
function! LightlineFugitive()
|
||||||
if exists('*fugitive#head')
|
if exists('*FugitiveHead')
|
||||||
let branch = fugitive#head()
|
let branch = FugitiveHead()
|
||||||
return branch !=# '' ? ''.branch : ''
|
return branch !=# '' ? ''.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
@@ -341,8 +341,8 @@ look nice.
|
|||||||
return &readonly ? '⭤' : ''
|
return &readonly ? '⭤' : ''
|
||||||
endfunction
|
endfunction
|
||||||
function! LightlineFugitive()
|
function! LightlineFugitive()
|
||||||
if exists('*fugitive#head')
|
if exists('*FugitiveHead')
|
||||||
let branch = fugitive#head()
|
let branch = FugitiveHead()
|
||||||
return branch !=# '' ? '⭠ '.branch : ''
|
return branch !=# '' ? '⭠ '.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
@@ -742,8 +742,8 @@ A nice example for non-patched font users.
|
|||||||
\ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '')
|
\ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '')
|
||||||
endfunction
|
endfunction
|
||||||
function! LightlineFugitive()
|
function! LightlineFugitive()
|
||||||
if &ft !~? 'vimfiler' && exists('*fugitive#head')
|
if &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||||
return fugitive#head()
|
return FugitiveHead()
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@@ -777,8 +777,8 @@ A nice example for |vim-powerline| font users:
|
|||||||
\ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '')
|
\ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '')
|
||||||
endfunction
|
endfunction
|
||||||
function! LightlineFugitive()
|
function! LightlineFugitive()
|
||||||
if &ft !~? 'vimfiler' && exists('*fugitive#head')
|
if &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||||
let branch = fugitive#head()
|
let branch = FugitiveHead()
|
||||||
return branch !=# '' ? '⭠ '.branch : ''
|
return branch !=# '' ? '⭠ '.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
@@ -836,9 +836,9 @@ For users who uses lots of plugins:
|
|||||||
|
|
||||||
function! LightlineFugitive()
|
function! LightlineFugitive()
|
||||||
try
|
try
|
||||||
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||||
let mark = '' " edit here for cool mark
|
let mark = '' " edit here for cool mark
|
||||||
let branch = fugitive#head()
|
let branch = FugitiveHead()
|
||||||
return branch !=# '' ? mark.branch : ''
|
return branch !=# '' ? mark.branch : ''
|
||||||
endif
|
endif
|
||||||
catch
|
catch
|
||||||
|
|||||||
Reference in New Issue
Block a user