diff --git a/autoload/airline.vim b/autoload/airline.vim index c4c7d77f..664c78e6 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -120,7 +120,12 @@ function! s:invoke_funcrefs(context, funcrefs) endfunction 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 function! airline#check_mode(winnr)