This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 144385 - Folding blocks with some scenarios (collapsed fold on same line)
Summary: Folding blocks with some scenarios (collapsed fold on same line)
Status: RESOLVED DUPLICATE of bug 89955
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) All
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-19 12:48 UTC by emi
Modified: 2008-08-19 16:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The final state of the locked fold, when only "four" can be toggled. The rest are blocked. (5.27 KB, image/png)
2008-08-19 12:49 UTC, emi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emi 2008-08-19 12:48:54 UTC
I've noticed this bug with HTML. Try this example:

<html>
    <p>one
    </p><p>two
    </p><p>three
    </p><p>four
    </p>
    
</html>
    
You'll notice that if you keep pressing on the fold button next to the "one" text the folding will block and you won't
be able to un-collapse the folds one, two and three. Only fold "four" will collapse/un-collapse. See attached screenshot.

The problem lies in the CodeFoldingSideBar.performAction(Mark) method, where it picks the last fold on the line in order
to toggle it. The bug is that if there are collapse folds before the last fold, those folds will forever be collapsed.
The only solution is the reopen the file or clone the editor.
Comment 1 emi 2008-08-19 12:49:41 UTC
Created attachment 67799 [details]
The final state of the locked fold, when only "four" can be toggled. The rest are blocked.
Comment 2 Petr Dvorak 2008-08-19 16:09:17 UTC
Hi! This is a known issue and I don't think this is a P2 as a simple workaround exists - when you dbl-click the fold
"{...}" in the editor, fold is normally expanded. I believe this works the same way as for example in MS Visual Studio...

*** This issue has been marked as a duplicate of 89955 ***
Comment 3 emi 2008-08-19 16:16:56 UTC
Fine by me. I didn't know that double-clicking the fold expands it back.