add guard for possible undefined window context (#276).
This commit is contained in:
parent
af330f6a47
commit
491091706f
@ -120,7 +120,12 @@ function! s:invoke_funcrefs(context, funcrefs)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#statusline(winnr)
|
function! airline#statusline(winnr)
|
||||||
return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line
|
if has_key(s:contexts, a:winnr)
|
||||||
|
return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line
|
||||||
|
endif
|
||||||
|
|
||||||
|
" in rare circumstances this happens...see #276
|
||||||
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#check_mode(winnr)
|
function! airline#check_mode(winnr)
|
||||||
|
Loading…
Reference in New Issue
Block a user