Skip to content

Commit

Permalink
--bugfix=Fix the issue where duplicate symbols in autoClosingPairs an…
Browse files Browse the repository at this point in the history
…d surrounding Pairs cannot be completed when the text is not selected
  • Loading branch information
StarkZhidian committed Aug 21, 2024
1 parent ec85ede commit b120662
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit b120662

Please sign in to comment.