thehogfather / brackets-code-folding

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

Code does not fold #64

Closed pbastowski closed 10 years ago

pbastowski commented 10 years ago

I'm on OS X Mavericks. Since update to Brackets Sprint 38 and the latest version of "Code Folding", code folding does not work any more for me.

As in, when I press Alt-1 to collapse-all or select menu View/Collapse All, nothing happens most of the time. Sometimes, the the first time I press Alt-1, one block that my cursor is in folds up, but that's all. After that Alt-1 does nothing.

I miss my code folding :(

thehogfather commented 10 years ago

Can you go into the Debug > show developer tools menu and see if there are any errors logged in the console?

pbastowski commented 10 years ago

​Yes, there are.

When I press Alt-1 the following error shows up:

  1. Uncaught Error: Inserting collapsed marker partially overlapping an existing one /thirdparty/CodeMirror2/lib/codemirror.js:4945http://localhost:9234/thirdparty/CodeMirror2/lib/codemirror.js
    1. markText/thirdparty/CodeMirror2/lib/codemirror.js:4945http://localhost:9234/thirdparty/CodeMirror2/lib/codemirror.js
    2. createObj.markText/thirdparty/CodeMirror2/lib/codemirror.js:6184http://localhost:9234/thirdparty/CodeMirror2/lib/codemirror.js
    3. (anonymous function)/thirdparty/CodeMirror2/lib/codemirror.js:6304http://localhost:9234/thirdparty/CodeMirror2/lib/codemirror.js
    4. doFoldfoldcode.js:65file:///Users/paulbastowski/Library/Application%20Support/Brackets/extensions/user/brackets-code-folding/foldhelpers/foldcode.js
    5. (anonymous function)foldcode.js:81file:///Users/paulbastowski/Library/Application%20Support/Brackets/extensions/user/brackets-code-folding/foldhelpers/foldcode.js
    6. (anonymous function)foldcode.js:125file:///Users/paulbastowski/Library/Application%20Support/Brackets/extensions/user/brackets-code-folding/foldhelpers/foldcode.js
    7. runInOp/thirdparty/CodeMirror2/lib/codemirror.js:1958http://localhost:9234/thirdparty/CodeMirror2/lib/codemirror.js
    8. CodeMirror.operation/thirdparty/CodeMirror2/lib/codemirror.js:4178http://localhost:9234/thirdparty/CodeMirror2/lib/codemirror.js
    9. CodeMirror.commands.foldAllfoldcode.js:122file:///Users/paulbastowski/Library/Application%20Support/Brackets/extensions/user/brackets-code-folding/foldhelpers/foldcode.js
    10. collapseAllmain.js:192file:///Users/paulbastowski/Library/Application%20Support/Brackets/extensions/user/brackets-code-folding/main.js
    11. Command.execute/command/CommandManager.js:90http://localhost:9234/command/CommandManager.js
    12. execute/command/CommandManager.js:275http://localhost:9234/command/CommandManager.js
    13. executeCommand/utils/ShellAPI.js:66http://localhost:9234/utils/ShellAPI.js

On 5 May 2014 15:49, Patrick Oladimeji notifications@github.com wrote:

Can you go into the Debug > show developer tools menu and see if there are any errors logged in the console?

— Reply to this email directly or view it on GitHubhttps://github.com/thehogfather/brackets-code-folding/issues/64#issuecomment-42189350 .

thehogfather commented 10 years ago

Thanks for this. You are uncovering an interesting situation where code folding partially overlaps an already folded region. If it is okay, I would like some more information. e.g. does this happen in javascript, html etc.. It would be especially helpful if you could share the document (or a simplified version) of the document that throws this error. I am happy for you to send the simplest code fragment from which I can reproduce the error.

pbastowski commented 10 years ago

​Hi Patrick

This problem happens with javascript. I have attached one of the files, which exhibit this behaviour. When I select Collapse All it correctly collapses blocks of code from line 1 to line 192. After that nothing gets collapsed.

Does this help?

​Paul ​

On 5 May 2014 17:11, Patrick Oladimeji notifications@github.com wrote:

Thanks for this. You are uncovering an interesting situation where code folding partially overlaps an already folded region. If it is okay, I would like some more information. e.g. does this happen in javascript, html etc.. It would be especially helpful if you could share the document (or a simplified version) of the document that throws this error. I am happy for you to send the simplest code fragment from which I can reproduce the error.

— Reply to this email directly or view it on GitHubhttps://github.com/thehogfather/brackets-code-folding/issues/64#issuecomment-42198105 .

thehogfather commented 10 years ago

@pbastowski I think you omitted to attach the file :( - it is a common post-completion error. Would you mind sending again?

pbastowski commented 10 years ago

I did attach it to the gmail email message, but I think github removed the attachment. I probably have to use the github web page itself to attach the file.

I'll do that today :)

On 07 May 2014, at 04:25, Patrick Oladimeji notifications@github.com wrote:

@pbastowski I think you omitted to attach the file :( - it is a common post-completion error. Would you mind sending again?

— Reply to this email directly or view it on GitHub.

pbastowski commented 10 years ago

Ok, I attached the file. But, Github only allows jpg/png, so to get it attached I had to add a ".png" extension to it. Please rename this file to polyfils.js after download.

polyfills js

thehogfather commented 10 years ago

Thanks for the file. The issue should be resolved if you get the latest version.

pbastowski commented 10 years ago

Indeed it is. Thanks, Patrick.

On 8 May 2014 06:19, Patrick Oladimeji notifications@github.com wrote:

Thanks for the file. The issue should be resolved if you get the latest version.

— Reply to this email directly or view it on GitHubhttps://github.com/thehogfather/brackets-code-folding/issues/64#issuecomment-42512061 .