thehogfather / brackets-code-folding

Code folding extension for brackets IDE
134 stars 42 forks source link

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

Closed brennanMKE closed 10 years ago

brennanMKE commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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

thehogfather commented 10 years ago

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.

brennanMKE commented 10 years ago

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