I have noticed a few ‘quirks’ in the highlight matching parentheses/brackets functionality.
1) When initially typing a closing bracket, the matching open bracket is highlighted when the cursor is immediately after the closing bracket. In all other cases, matching brackets are highlighted only when the cursor is located immediately before the bracket.
2) After inserting text immediately before a closing bracket, highlighting does not work until the cursor is moved. For example, type “{}” then insert some text between the brackets. The highlighting goes away even thought the cursor is immediately before the closing bracket.
3) No highlighting is shown if the cursor is immediately after the closing bracket. This is a little unintuitive.
I would suggest the following change to make the behavior a little more consistent and user friendly. Highlight matching brackets when the cursor is before OR after a bracket. If the cursor is immediately adjacent to two sets of brackets (e.g. one before, one after) only highlight the inner brackets.
e.g.
(foo)|
(foo|)
((foo)|)