-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Folds don't work with non-indented content #15690
Comments
Yeah, I think that the GDScript module should decide which blocks are foldable and just have an API in TextEdit to set those blocks. Other code editors could use different criteria for code folding. |
@Paulb23 |
In my experience from using other text editors/IDEs, this is common behavior. |
Actually I was wrong. Godot folds comments regardless. What happens is godot doesn't fold them if there's no more code after them. So this folds nicely: func do_things():
something.x = 10
something.y = 100
# this is a user comment. The comments below are made through hotkey
# things.append(cake)
# things.append(bbq_sauce)
derp = 10 # only if you remove this line it doesn't. |
Still valid in 0b910cd |
6b0b1a4 |
The first issue mentioned appears to be resolved by now. The issue metioned by @MatteoPiovanelli-Laser is the same as in #84820 and #85016 will potentially fix it. |
Godot 3.0 master 6a4521d
In the following code, the array cannot be folded, which is unexpected.
The multiline string inside, however, ends up having folds, which is unexpected.
At this point I would suggest code folding to become a bit more code aware, since it would also help with other languages that are not indentation-based (shaders, C#, JSON or whatever Godot can edit)
The text was updated successfully, but these errors were encountered: