Skip to content

Commit ece032b

Browse files
committed
Fix weight-less paren adjustment index
1 parent 7fea6e6 commit ece032b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

StabilityMatrix.Avalonia/Behaviors/TextEditorWeightAdjustmentBehavior.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ is not { } tokenSegment
223223
else
224224
{
225225
// Insert the weight before the closing parenthesis.
226-
replacementOffset = parenthesizedNode.EndIndex; // Insert at the end of parenthesized node
226+
replacementOffset = parenthesizedNode.EndIndex - 1; // EndIndex is exclusive, so -1
227227
replacementLength = 0; // insert
228228
newText = $":{FormatWeight(newWeight)}";
229229
}

0 commit comments

Comments
 (0)