Fix parenthesis auto selection

Fixes #13813
This commit is contained in:
missionfloyd 2023-11-03 00:59:19 -06:00
parent 464fbcd921
commit 8052a4971e

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