Skip to content

Commit

Permalink
Merge pull request #13829 from AUTOMATIC1111/paren-fix
Browse files Browse the repository at this point in the history
Fix parenthesis auto selection
  • Loading branch information
AUTOMATIC1111 authored Nov 3, 2023
2 parents 4c423f6 + 8052a49 commit 1f373a2
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 1f373a2

Please sign in to comment.