Skip to content
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

GDScript Editor Nesting bug #84820

Open
neomonkey opened this issue Nov 12, 2023 · 1 comment · May be fixed by #85016
Open

GDScript Editor Nesting bug #84820

neomonkey opened this issue Nov 12, 2023 · 1 comment · May be fixed by #85016

Comments

@neomonkey
Copy link

Godot version

4.1.3-Stable

System information

Windows 10

Issue description

GDScript editor nesting isn't working always correctly. When I want to collabse a function it sometimes collabses the next funtions """ comments with it. Annoying little bug, and I think it is because I use space in

Steps to reproduce

(Image 1) First I have this stupidly simple function which nulls my values. I can collabse everything (lines 51, 59, and 64) correctly except line 54 which is func clearNPC(). If I collabse it, image 2 will occur. If I collabse line 59 first, then Image 3 happens. This happens because I start the comment line with empty space. If I remove the spaces in the beginning of the line 62, collabse continue to work normally.

1
2
3

Minimal reproduction project

N/A

@DinDotDout
Copy link
Contributor

Happens the same when doing something similar with single line comments:
image
image

Investigating a bit it seems that this is being processed in the function fold_line from code_edit.cpp. When trying to count how many lines should be folded It only stops when it finds a new block of code or reaches the end of the file while keeping track of the highest line with and indentation level higher than the one it started at. Is the expected outcome to have all the text be treated with the same indentation level as the start of the multi line comment?

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

Successfully merging a pull request may close this issue.

3 participants