Merge pull request #1862 from mbbill/master

Fixed t:undotree undefined error
This commit is contained in:
Christian Brabandt 2019-01-28 10:55:44 +01:00 committed by GitHub
commit d3859dc5dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -11,14 +11,14 @@ function! airline#extensions#undotree#apply(...)
if exists('t:undotree')
if &ft == 'undotree'
if exists('*t:undotree.GetStatusLine')
call airline#extensions#apply_left_override('undo', '%{t:undotree.GetStatusLine()}')
call airline#extensions#apply_left_override('undo', '%{exists("t:undotree") ? t:undotree.GetStatusLine() : ""}')
else
call airline#extensions#apply_left_override('undotree', '%f')
endif
endif
if &ft == 'diff' && exists('*t:diffpanel.GetStatusLine')
call airline#extensions#apply_left_override('diff', '%{t:diffpanel.GetStatusLine()}')
call airline#extensions#apply_left_override('diff', '%{exists("t:diffpanel") ? t:diffpanel.GetStatusLine() : ""}')
endif
endif
endfunction