Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent error when g:airline_section_x is undefined #219

Merged
merged 1 commit into from
Jan 21, 2018

Conversation

chrisbra
Copy link
Contributor

@chrisbra chrisbra commented Jan 6, 2018

I don't know why this happens, but I just got a bug report vim-airline/vim-airline#1627 where an error is caused by trying to access g:airline_section_x which seems to be undefined for that user.

So here is a fix, that does not unconditionally access that variable, but only when it exists.

fixes vim-airline/vim-airline#1627

Thanks!

@ryanoasis
Copy link
Owner

Thanks, gotcha yeah I did not understand how/why that would happen but this looks like a reasonable thing to do. Worst case it won't do anything, best case would help prevent the undefined. 😄

I'll get this merged with the next cut version

@ryanoasis ryanoasis added this to the v0.10.0 milestone Jan 7, 2018
@chrisbra
Copy link
Contributor Author

chrisbra commented Jan 8, 2018

Great.

(Greetings to Charlotte. Have been living there 20 years ago, when I participated in an exchange student program. Hope you don't suffer from the extreme cold currently in the US)

@ryanoasis
Copy link
Owner

Hey. Oh that's cool! I've only been here for just over 4 years. Yeah it was very unseasonably cold a while ago but back to somewhat normal now. Thanks!

@ryanoasis ryanoasis merged commit 0cc8062 into ryanoasis:master Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error after update
2 participants