When typing anything that creates an end
automatically, pressing Enter at the end unfolds all folded code under it when the end
is added. There is also a bug where some lines containing end
are hidden after all of the code is unfolded. Since it is hard to explain, I made a short video showing this bug.
As you can see, when pressing Enter after the parentheses of a function, all folded code under it, but not above it, unfolds. This also happens with tables ( {}
), do
, for
, if
, elseif
, else
, and while
. Also, line 26, which contained an end
, was still hidden when everything else appeared.
To reproduce:
- Create a function, if statement, for/while loop, etc.
- Fold that function using the arrow to the left of the line
- Now add another function above that function, and press enter after the parentheses. The first function you created will now be unfolded.
This bug has existed for at least a few weeks, but I just haven’t bothered to make a bug report for it until now. I think it started around the time that Script Editor - New Foundation and First Features was posted, and is likely because of the new script editor that was mentioned in that post.