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

Undefined variable: g:ack_autofold_results on save #124

Closed
felixbuenemann opened this issue Apr 21, 2014 · 2 comments
Closed

Undefined variable: g:ack_autofold_results on save #124

felixbuenemann opened this issue Apr 21, 2014 · 2 comments

Comments

@felixbuenemann
Copy link

Since updating to the newest version I sometimes get this error on save:

Error detected while processing /Users/felix/Dropbox/dotfiles/vim/bundle/ack.vim/ftplugin/qf.vim:
line    1:
E121: Undefined variable: g:ack_autofold_results
E15: Invalid expression: g:ack_autofold_results
Error detected while processing function <SNR>56_BufWritePostHook..<SNR>56_UpdateErrors..<SNR>56_CacheErrors:
line   28:
E170: Missing :endfor
Error detected while processing function <SNR>56_BufWritePostHook..<SNR>56_UpdateErrors:
line    8:
E171: Missing :endif

I think it happens if a linter chokes on a syntax error in the code I'm writing, so it opens the quickfix window on save.

@felixbuenemann
Copy link
Author

I replaced the if check in ftplugin/qf.vim with:

if exists("g:ack_autofold_results") && g:ack_autofold_results

which gets rid of the error.

@kassio kassio closed this as completed in 52b0756 Apr 22, 2014
@felixbuenemann
Copy link
Author

Thanks!

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

No branches or pull requests

1 participant