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

[CLOSED] Collapsing is broken #10515

Open
core-ai-bot opened this issue Aug 30, 2021 · 23 comments
Open

[CLOSED] Collapsing is broken #10515

core-ai-bot opened this issue Aug 30, 2021 · 23 comments

Comments

@core-ai-bot
Copy link
Member

Issue by ghost
Friday Feb 19, 2016 at 13:42 GMT
Originally opened as adobe/brackets#12232


Sometimes when I collapse and uncollapse code that has collapsible code within it (like a function with an if statement within it) everything gets all screwed up and the collapse arrows point the wrong direction and the collapsing just stops working all together.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Wednesday May 04, 2016 at 03:07 GMT


I get this all the time, very frustrating.

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday May 04, 2016 at 08:15 GMT


I cannot reproduce with this small javascript snippet:

function foo() {
    if (false) {
        return;
    }
}

Can you look at Debug --> Show Develop Tools when will happen again?
Will happen without extensions too?
If you have clear step to reproduce let us know (code, language, etc).

@core-ai-bot
Copy link
Member Author

Comment by ghost
Thursday May 05, 2016 at 00:47 GMT


If it was one specific example that would be one thing, but its everywhere all the time. Its screwed up more often than it works. I downgraded to Brackets 1.5 and it works perfectly again.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Friday May 06, 2016 at 00:27 GMT


I'm not sure how to reproduce exactly, but it happens all the time after maybe a couple of collapsing/ expanding actions. This is a screenshot from the devtools -
image

@core-ai-bot
Copy link
Member Author

Comment by ghost
Monday May 09, 2016 at 02:54 GMT


Is this issue easily fixable / will it be fixed soon? It's making the ide unusable. I went as far as to install an extension that was supposed to handle collapsing but brackets threw an error saying that extension was usable.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Tuesday May 17, 2016 at 19:55 GMT


Yes it makes this version of Brackets completely unusable. I downgraded to 1.5 and it works great, there are a few extensions I cant use but all the ones I want I can use so my suggestion would be to downgrade until this is fixed.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Friday Jun 10, 2016 at 20:56 GMT


So Brackets 1.7 came out today and I was all excited thinking I could start using the latest version of brackets again so I could get the latest plugins... NOPE you still have not fixed this issue, it's still happening. Your IDE is still completely unuseable because your collapsing is broken.

brackes-issue

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Monday Jun 13, 2016 at 13:58 GMT


The issue is clear, not how can we reproduce.
You could try to see if you can reproduce on CodeMirror demo to see if an issue with it.
You could try to delete your state.json and brackets.json (remember to take a backup) and see if you can reproduce again.
/cc@thehogfather as the original author to see if he has better ideas.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Monday Jun 13, 2016 at 19:43 GMT


I can't reproduce it in the demo. It normally does not start happened until I've been using brackets for a 1/2 hour+, but with a long enough time using brackets its happens EVERY time. The log shows no errors. I'm just going to switch to another IDE.

@core-ai-bot
Copy link
Member Author

Comment by thehogfather
Monday Jun 13, 2016 at 21:01 GMT


@addui if you dont mind answering the following - would love to help out and sort this out when I get some time. Are you on a mac, windows or linux? And what version. Do you typically have more than one instance of brackets open when you encounter this bug? Approximately how many lines of code is in the file in the animated screen shot in you post.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Wednesday Jun 15, 2016 at 19:36 GMT


I am using Windows 10. I have experienced this error with Brackets 1.6 and 1.7. I may have more than one file open with Brackets but only ever 1 instance of Brackets open at once. That particular file has about 300 lines of code. Another thing I just thought of is that I always work off a network drive. The file never sits on my local machine but rather a server so that I can access it from multiple workstations, and yes this error occurs on multiple workstations (all windows 10). Currently I have uninstalled Brackets 1.6 and 1.7 because this problem is so bad and I use Brackets 1.5, which works perfectly always. So what changed between Brackets 1.5 and 1.6? Are they using the same version of CodeMirror or did Brackets update it's version of CodeMirror between those builds?

@core-ai-bot
Copy link
Member Author

Comment by thehogfather
Wednesday Jun 15, 2016 at 19:57 GMT


@addui I have a tentative PR that addresses this issue #12521 - though I have no idea how long it would take the brackets team to review and possibly merge it. If you are comfortable with git and you've worked with brackets development before you can test the branch https://github.com/thehogfather/brackets/tree/Code-folding-issue-12456

The issue has to do with the caching and syncing of the folded lines and that significantly changed across versions. If you are able to test this, that would be great - otherwise I might reconsider resurrecting the extension version of this so that I can make more frequent bug fixes.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Thursday Jun 16, 2016 at 12:27 GMT


I'm just going to stick with Brackets 1.5 for now and would like to some kind of notification when this issue is fixed so that I can upgrade.

@core-ai-bot
Copy link
Member Author

Comment by designcise
Wednesday Jun 22, 2016 at 04:17 GMT


I was able to reproduce this by:

  1. Folding some piece of code;
  2. Selecting & hitting tab to indent the code;
  3. Try collapsing or expanding the indented code, it should reproduce the problem.

I have witnessed this problem on other occasions as well, but like others have pointed out, haven't been able to reproduce it.

@core-ai-bot
Copy link
Member Author

Comment by alignsoft
Wednesday Jun 29, 2016 at 17:53 GMT


I'm seeing this issue as well with Brackets 1.7 on a Mac running OS X 10.11.5

Folding works fine for a while, but after some time the triangles stop responding, usually after unfolding a function to review, then the triangle indicates it's collapsed again even though the code is still visible, and after that I have to quit and relaunch Brackets to get folding working again.

Project is 40 files ±, ranging anywhere from a few dozen to 1,000 lines of code.

@core-ai-bot
Copy link
Member Author

Comment by thehogfather
Wednesday Jun 29, 2016 at 20:47 GMT


In the end the issue is quite easy to reproduce. All one has to do is the following:

  1. Start with a file with say 40 lines with at least one foldable region.
  2. Fold one foldable region
  3. Anywhere above the foldable region, delete or add a line.
  4. Try to unfold the folded region in 2.

Note that I have done the best I can to address this issue by submitting a PR #12521. It is a tiny change and should be easy to review. Happy to answer any questions about the context. I cannot do more than that. Someone with write permissions on the repo needs to review and decide whether or not to merge this. I am still investigating whether this bug goes all the way back to the CodeMirror api.

cc@abose@MarcelGerber

@core-ai-bot
Copy link
Member Author

Comment by abose
Friday Jul 01, 2016 at 04:54 GMT


tagging@swmitra

@core-ai-bot
Copy link
Member Author

Comment by derrickb
Sunday Jul 03, 2016 at 09:05 GMT


Can confirm@thehogfather 's repro steps as well. This issue has been driving me crazy.

I'm on Windows 10 x64, Brackets 1.7

@core-ai-bot
Copy link
Member Author

Comment by alignsoft
Thursday Jul 07, 2016 at 22:26 GMT


Any chance this can get merged into the project? Is there a 1.7.1 update in the wings?

@core-ai-bot
Copy link
Member Author

Comment by nethip
Friday Jul 08, 2016 at 04:11 GMT


@alignsoft We could go ahead with the merge, but I am afraid we don't have 1.7.1 on the cards. Once the PR is merged, I would recommend you run Brackets from source. It's pretty easy to do that. Refer to the below link to do so.

https://github.com/adobe/brackets/wiki/How-to-Hack-on-Brackets

@core-ai-bot
Copy link
Member Author

Comment by ghost
Thursday Jul 14, 2016 at 14:50 GMT


So has the bug's cause been identified and fixed? Is it fixed in source? If not then there is no point in running from Source yet.

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday Aug 10, 2016 at 12:08 GMT


Should be fixed in 1.8 by adobe/brackets#12521
@addui you can try building brackets from source now that #12521 has been merged.

@core-ai-bot
Copy link
Member Author

Comment by ghost
Wednesday Aug 10, 2016 at 18:13 GMT


Thank You, I will give it a shot when I get the chance

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