diff --git a/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolPairMatch.java b/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolPairMatch.java index dcb5b6d26..c453cdda6 100644 --- a/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolPairMatch.java +++ b/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolPairMatch.java @@ -89,7 +89,7 @@ public void putPair(char[] charArray, SymbolPair symbolPair) { } list.add(symbolPair); - multipleCharByEndPairMaps.put(charArray[charArray.length - 1], list); + multipleCharByEndPairMaps.put(endChar, list); } /** diff --git a/language-textmate/src/main/java/io/github/rosemoe/sora/langs/textmate/TextMateSymbolPairMatch.java b/language-textmate/src/main/java/io/github/rosemoe/sora/langs/textmate/TextMateSymbolPairMatch.java index ae0a21388..59ab8b10f 100644 --- a/language-textmate/src/main/java/io/github/rosemoe/sora/langs/textmate/TextMateSymbolPairMatch.java +++ b/language-textmate/src/main/java/io/github/rosemoe/sora/langs/textmate/TextMateSymbolPairMatch.java @@ -95,19 +95,6 @@ public void updatePair() { var newPair = new AutoClosingPairConditional(surroundingPair.open, surroundingPair.close, surroundingPairFlagWithList); - var mergePairIndex = mergePairs.indexOf(newPair); - - if (mergePairIndex >= 0) { - var mergePair = mergePairs.get(mergePairIndex); - - if (mergePair.notIn == null || mergePair.notIn.isEmpty()) { - mergePairs.add(newPair); - continue; - } - - mergePair.notIn.add(surroundingPairFlag); - - } mergePairs.add(newPair); } }