-
Notifications
You must be signed in to change notification settings - Fork 696
fix: restore folds when formatting if available #1682
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
fix: restore folds when formatting if available #1682
Conversation
UnschooledGamer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Implementation will work fine normally, But Incase where you had folded something like a method or a function, & the formatted code changes placement of them. This implementation may be problematic.
In that cases there will some weird folding which will be obvious, what else we can do ? |
Could recalculate the folds based on the Updated Syntax Trees 🤔 💭 |
But how will it going to detect where it need the recalculation |
By viewing the coords of old folds & the type/level of folds, and recreating that fold. |
We can have some better solution in codemirror implementation |
@bajrangCoder, you're right. Implement the same functionality in it. Also, whenever you touch it once again. |
No description provided.