-
Notifications
You must be signed in to change notification settings - Fork 24
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
Reloading a file with expanded folds breaks them #37
Comments
Do you have Ok, tentatively added your Does |
I have autoread set and update the files with
Yes. I only made it
I got the same impression from #vim. |
Thanks for clearinf that up. So is it fixed? |
In master I get
|
Hm. Please check again with BufRead. Cannot reproduce though when using :checktime after changinf outside of Vim. Also, FastFold does not change any buffer contents. If this doesn't fix it, please provide steps to reproduce with a minimal vimrc. |
That seems to have fixed it. Edit: Spoke too soon. Crash is gone but it still does not update folds properly. I'll try producing a minimal sample later, need sleep first. |
Strange. What FastFold now does is recomputing folds after the buffer was read in again by the BufRead trigger. So if you hit zuz say to update them manually, are folds fine ? |
But have some sleep first. |
Refined the autocmd and it works here. With the exception of pandoc markdown files whose fold method switches from expr to syntax. But Otherwise it is fine. |
Please make sure for FastFold tô function correctly, that the checktime autocmd is Nested. |
If I make changes to a file outside of vim and reload that file, FastFold only correctly updates if all my folds are closed. If I have any expanded, something breaks and all of my folds start and stop at completely wrong positions.
This work-around seems to alleviate the problem:
That way vim will reload the folds correctly, before FastFold gets a chance to “cache” the wrong values.
The text was updated successfully, but these errors were encountered: