From 501e3415894fe9a8ce2a362a54fb48b66b1e880e Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sat, 31 Aug 2013 21:45:21 -0400 Subject: [PATCH] fix error for when keys are not present in unite context. --- autoload/airline/extensions/unite.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/unite.vim b/autoload/airline/extensions/unite.vim index 6ea42e1..217309c 100644 --- a/autoload/airline/extensions/unite.vim +++ b/autoload/airline/extensions/unite.vim @@ -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