Only insert newlines for open brackets if the cursor is at the end of the input string.