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

JavaScript folding fails to load function but folds inner blocks #32

Closed
brennanMKE opened this issue Nov 13, 2013 · 6 comments
Closed
Assignees

Comments

@brennanMKE
Copy link

Folding was working fine until today. I do not know what has changed. I have uninstalled and reinstalled the folding plugin and I find that it seems to be having trouble. I wish I could be more specific.

Perhaps my source file, which is Parse Cloud Code, is getting too big and is causing trouble with this plugin. I will try breaking down the source file into pieces.

@brennanMKE
Copy link
Author

I've moved a few hundred lines to another file and folding is still misbehaving. I've attached a screenshot. I do not think there is anything wrong with the syntax. JSHint passes with no errors.

funkyfolding

@thehogfather
Copy link
Owner

oh that looks interesting. I think it might have to do with saving and restoring line folds ...

How many lines of code do you have in your file?

Could you copy the contents of the file onto a new file and tell me if the fold marks are then rendered correctly?

Also what happens when you use Shift-Alt-1 (this should expand all code regions)?

@brennanMKE
Copy link
Author

I broke up the code into many files now and I am not seeing the folding issue anymore. My guess is that updating to the latest version of Brackets did not clear out any folds which were stored previously.

@thehogfather
Copy link
Owner

Thanks for the update. Let's keep and eye on it just incase it resurfaces.

@thehogfather
Copy link
Owner

So I have been able to reproduce similar issue.

  1. Load any file and fold some code regions.
  2. Add or remove a number of lines above the folded code regions.
  3. Save and close the file so that it is now removed from the working files list.
  4. Reopen the file.

Result is that the folded code regions are restored wrongly. This is because the extension does not currently update the folded regions correctly.

A fix is in progress.

@ghost ghost assigned thehogfather Nov 16, 2013
thehogfather added a commit that referenced this issue Nov 16, 2013
…isted after modifying document. Consequently restoring line folds results in wrong folded regions.
@brennanMKE
Copy link
Author

Excellent. I see there is a new Brackets update available. I look forward to your update and the new release.

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

2 participants