[TxMt] Re: Bug in enclose selection with multi-key characters using US-International keyboard layout

Allan Odgaard mailinglist at textmate.org
Thu Sep 18 09:13:19 UTC 2014


On 18 Sep 2014, at 10:46, Etienne Samson wrote:

>> I have both the ISO and ANSI US/international keyboard, and I can 
>> type all of the following quotes without using dead keys: ‘…’, 
>> “…”, "…", '…', and `…`.
>
> I can confirm that this also happens with the standard French layout 
> with the ` backtick, the selected text just disappear. As the OP says, 
> not a really harmful, significant bug, I just want to confirm that 
> there's an issue.

Well, I can certainly reproduce it. What I didn’t understand is how 
the OP couldn’t type the above quotes on a US keyboard without using 
dead keys.

> A quick fix (IMHO, I'm no expert on the text system) would be to make 
> dead keys be handled as normal keys as soon as you have something 
> selected […]

TextMate doesn’t know as much as you here. The input system is 
abstracted to support many different input modes. This is the protocol 
currently used to talk to TextMate: 
https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Protocols/NSTextInput_Protocol/Reference/Reference.html

As you can see, there is no “here is a dead key that looks like a 
quote” but rather methods like -setMarkedText:selectedRange:.


More information about the textmate mailing list