check if the cursor is in a position where a pair of brackets are already highlighted and use that pair instead of searching
With today's changes at least, I don't see how that would be useful. Bracket highlighting highlights an opening bracket to the right of the cursor, whereas for this feature we want an outside bracket to be matched (see last commit message for clearer explanation).