Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Code folding triangles don't update on unfold when block above them is removed #12456

Closed
jwestbrook opened this issue May 25, 2016 · 3 comments
Closed

Comments

@jwestbrook
Copy link

Scenario :

In a PHP file with mixed HTML and PHP I'm folding the <tr>s of a table. If I have a set of 3 rows and I unfold row 2 which has 2 PHP blocks within it, and remove one of the blocks, then go to row 3 to unfold - the row will unfold but the triangle will not update and I think the folded state will not save.

For example

Step 1

<table>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr>
</table>

Step 2

<table>
<tr>...</tr>
<tr>
    <td>
       <?php
       if($variable)
       {
           foreach($variable as $v)
           {

           }
       }
       ?>
   </td>
</tr>
<tr>...</tr>
</table>

Step 3

<table>
<tr>...</tr>
<tr>
    <td>
       <?php
       if($variable) //remove
       {                  //remove
           foreach($variable as $v)
           {

           }
       }             //remove
       ?>
   </td>
</tr>
<tr>...</tr>
</table>

Step 4

<table>
<tr>...</tr>
<tr>
    <td>
       <?php
           foreach($variable as $v)
           {

           }
       ?>
   </td>
</tr>
<tr>...</tr>
</table>

At this point unfolding row 3 will show the code contained, but the triangle will not rotate and will not respond to any more clicks unless you reload Brackets.

OSX 10.11.5

Release 1.6 build 1.6.0-16680 (release 3df0ac6)
build timestamp: Tue Jan 12 2016 06:18:55 GMT-0800

Don't know if its worked before

I've attempted this with and without extensions enabled.

No errors logged in console

@thehogfather
Copy link
Contributor

@jwestbrook thanks for this. I'm able to reproduce this with some small variations on your test.
I am fairly sure this is related to #12232

@jwestbrook
Copy link
Author

Yep that looks like the same behavior I get - glad I could illustrate a test case

thehogfather added a commit to thehogfather/brackets that referenced this issue Jun 14, 2016
… not correctly updated after deleting lines above a folded region.
thehogfather added a commit to thehogfather/brackets that referenced this issue Jun 14, 2016
… not correctly updated after deleting lines above a folded region.
ficristo added a commit that referenced this issue Aug 10, 2016
Addresses #12456: code folding triangle don't update correctly
@ficristo
Copy link
Collaborator

Should be fixed in 1.8 by #12521

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants