Merge pull request #13829 from AUTOMATIC1111/paren-fix

Fix parenthesis auto selection
This commit is contained in:
AUTOMATIC1111 2023-11-03 19:59:01 +03:00 committed by GitHub
commit 1f373a2baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);