-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
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
Collapsing a func that ends in a region shows #endregion #90825
Comments
Confirmed in func test(): # Begin indent region.
#region Test # Begin comment region.
print_debug("hi") # End indent region.
#endregion # End comment region. СС @Paulb23 |
This is unrelated to regions, it happens with all comments after the expected end. (and endregion counts as a comment here) func test():
print_debug("hi")
# this will be folded. |
It's not ohhhh WHAT A BUG MAN! |
I have also found that something like: #test
#region New Code Region
func _process(delta):
pass
#endregion and folding test will also fold the beginning of fold region. |
PR #85016 ensures that comments on adjacent lines are treated as a block, based on the indentation level of the first line. This does not impact regions. This functionality could potentially be incorporated into the PR, as a more comprehensive method for determining what should and shouldn’t be folded is already being addressed. |
Region folds may not have a clear answer as the folding the function in the following code should only close up until "var x" unless regions override the fold scope, which may result in more confusing behavior. func _process(delta):
#region New Code Region
pass
var x
#endregion |
Tested versions
System information
Windows 11 - Godot 4.2.1 stable - Compatibility render
Issue description
Using GDScript, collapsing a function that ends in a region returns #endregion
Steps to reproduce
func test():
#region Test
print_debug("hi")
#endregion
-> then collapse the func
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: