fix error for when keys are not present in unite context.

This commit is contained in:
Bailey Ling 2013-08-31 21:45:21 -04:00
parent 660109a61a
commit 501e341589
1 changed files with 2 additions and 2 deletions

View File

@ -4,10 +4,10 @@
function! airline#extensions#unite#apply(...)
if &ft == 'unite'
call a:1.add_section('airline_a', ' Unite ')
call a:1.add_section('airline_b', ' %{unite#get_context().buffer_name} ')
call a:1.add_section('airline_b', ' %{get(unite#get_context(), "buffer_name", "")} ')
call a:1.add_section('airline_c', ' %{unite#get_status_string()} ')
call a:1.split()
call a:1.add_section('airline_y', ' %{unite#get_context().real_buffer_name} ')
call a:1.add_section('airline_y', ' %{get(unite#get_context(), "real_buffer_name", "")} ')
return 1
endif
endfunction