On Tue, Feb 24, 2015 at 12:12 PM, Bert Freudenberg bert@freudenbergs.de wrote:
On 24.02.2015, at 09:23, Chris Muller asqueaker@gmail.com wrote:
Try filing in the attached patch and see if it does what you want.
MNU: nextNonwhitespaceCharacter
It simply checks the next non-whitespace character in front of the cursor and if its the same closer that was typed, simply advances the cursor rather than type the closing character.
This sounds too simplistic to me. Wouldn't that mean I can never insert an additional closing paren?
Of course not. You talked about the requirement that "typed-input should equal expected output" to address the use-case of "blind-typing". That makes perfect sense and this fix addresses that whilst preserving all of the current behaviors.
The only time it could possibly be an "issue" is if you needed to pass a closer Character to the argument of a keyword message, like:
(myObject includesCharacter: $))
I think the editor needs to keep a stack of auto-inserted characters.
... which your stack wouldn't solve, but you could simply type _another_ closing paren and you're golden. That's a rare case that doesn't really behave all that badly and if there is even a worse case than that (which, I can't fathom), you have the clipboard pasting available to paste whatever you want.
I made a proper version in the Inbox. Why not just try it and see if its an improvement over what we already have?