Skip to content

Commit

Permalink
feat: Allow selection of next-statement connections in line cursor (#54)
Browse files Browse the repository at this point in the history
This allows insertion of new blocks into a stack.
  • Loading branch information
cpcallen authored Sep 11, 2024
1 parent fe2727d commit 4371d28
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/line_cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ export class LineCursor extends Marker {
}
let newNode = this.getNextNode(curNode, this.validLineNode);

// Skip the input or next value if there is a connected block.
// Skip the input (but not next) connection if there is a connected block.
if (
newNode &&
(newNode.getType() == ASTNode.types.INPUT ||
newNode.getType() == ASTNode.types.NEXT) &&
newNode.getType() === ASTNode.types.INPUT &&
(newNode.getLocation() as Blockly.Connection).targetBlock()
) {
newNode = this.getNextNode(newNode, this.validLineNode);
Expand Down

0 comments on commit 4371d28

Please sign in to comment.