Normally whenever text is selected and new text is typed, the new text replaces the selected text. But if I select something and type a left parenthesis “(”, the selected text gets surrounded with parentheses rather than replaced. E.g. If I want to change square brackets to curved in this line:
[my text]
… if I select the left bracket and type “(”, I get:
([)my text]
(And, strangely, the first three chracters “([)” get selected – normally when type-replacing text, the original text gets de-selected and the insertion point automaticaly moves to the point after it.)
If I type any other character, I get the expected behavior, e.g. if I type “z” when the left bracket is selected, I get:
zmy text]
… and the selection goes away, and the insertion point goes between z and m.
I can even type the right parenthesis character and it works correctly – the bug is just when typing left parenthesis.