Skip to content

Commit

Permalink
Fix parenthesis auto selection
Browse files Browse the repository at this point in the history
  • Loading branch information
missionfloyd authored and ruchej committed Sep 30, 2024
1 parent 8242a43 commit 654b82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/edit-attention.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function keyupEditAttention(event) {
if (afterParen == -1) return false;

let afterOpeningParen = after.indexOf(OPEN);
if (afterOpeningParen != -1 && afterOpeningParen < beforeParen) return false;
if (afterOpeningParen != -1 && afterOpeningParen < afterParen) return false;

// Set the selection to the text between the parenthesis
const parenContent = text.substring(beforeParen + 1, selectionStart + afterParen);
Expand Down

0 comments on commit 654b82b

Please sign in to comment.