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

String and coments folding scope fix and restructuring #85016

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DinDotDout
Copy link
Contributor

@DinDotDout DinDotDout commented Nov 17, 2023

This references issue #84820.
As no discussion was started in the reference issue i tried to fix it according to what seemed to be the expected outcome.
As of now, comments and strings are being folded based on the latest higher indentation level without taking comment/string fold blocks as units. My solution makes it so that they get treated as a block based on the indentation of the starting indent level of the block, which is how comment folding was already being treated and did not translate when they being recursively folded when folding a scope.

As I was finding it difficult to follow what was being done, I restructured fold_line and separated the functionality. If it is not desired it can be reverted easily while keeping the new added functionality.

@DinDotDout DinDotDout requested a review from a team as a code owner November 17, 2023 14:16
@AThousandShips AThousandShips added this to the 4.3 milestone Nov 17, 2023
@AThousandShips AThousandShips changed the title String and coments folding scope fix and reestructure String and coments folding scope fix and restructuring Dec 21, 2023
@kitbdev
Copy link
Contributor

kitbdev commented Apr 19, 2024

I think the separation should be reverted, there doesn't need to be multiple methods for this.
Also make sure that the if statements have braces and comments use // and have periods (see here).

related / possibly fixes

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

Successfully merging this pull request may close these issues.

GDScript Editor Nesting bug
4 participants