Skip to content

Conversation

@gonfunko
Copy link
Contributor

This PR fixes #725. In cases where a statement block was selected and a new statement block was inserted, the new block would be proposed for connection to the selected block. If the selected block's next block is immovable however, this is invalid, because to splice the new block into the middle of an immovable block stack would move the subsequent blocks as a side effect. This PR verifies that the next connection is actually capable of connecting to the new block, and keeps looking down the stack until it finds an eligible connection or gives up.

@gonfunko gonfunko requested a review from a team as a code owner September 29, 2025 21:27
@gonfunko gonfunko requested review from BenHenning and removed request for a team September 29, 2025 21:27
Copy link
Collaborator

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gonfunko! Makes sense to me!

@gonfunko
Copy link
Contributor Author

@RoboErikG pointed out that this bug still existed for input blocks. I've added another commit to address that scenario. PTAL @BenHenning

Copy link
Collaborator

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes still make sense, thanks!

@gonfunko gonfunko merged commit 568e6ff into main Oct 1, 2025
7 of 8 checks passed
@gonfunko gonfunko deleted the immovable-insertion branch October 1, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insertion from Toolbox incorrectly replaces immovable blocks

3 participants