Bug when typing left parenthesis character


#1

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.


#2

I believe this is expected behaviour, rather than a bug, though I can see how it would be a little irritating if unexpected in the use case you’ve put forward. Same behaviour applies to any auto-complete pairs e.g. () [] {} “”.


#3

Hm, is there a way to disable this behavior? I don’t think this sort of auto-complete makes sense in any use case – it’s faster and easier to type

left-bracket - blah - right-bracket

than to type

left-bracket - blah - right-arrow

…and obviously the standard typing behavior more consistent and less confusing too.