Eli Zaretskii <
eliz@gnu.org> schrieb am Mo., 14. März 2016 um 17:43 Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Mon, 14 Mar 2016 13:56:41 +0100
>
> I'd suggest the following (and will happily provide patches if
> accepted):
>
> - Don't enable UTF-8 coordinates at all. It is too hard to figure out
> whether they are enabled. Rather, err on the safe side and only use
> single-byte coordinates. (The superior SGR mode, which doesn't suffer
> from this problem, should remain enabled.)
How about providing a user option, off by default, to enable that? A
user who knows that this works on her machine will then be able to use
the feature.
I considered that, but then it would be impossible to have different terminals with and without the option. Might still be a good idea, if it's off by default.
> - In `xterm-mouse--read-number-from-terminal', specify a very short
> timeout. The terminal will always write the entire escape sequence as
> a unit, so waiting only increases the chance to accidentially read
> unrelated events.
Won't this break when working on a remote machine via a slow link?
Maybe, haven't tried.
> - As an optimization, provide a `read-byte' function written in C that
> reads a single byte without taking the current terminal encoding into
> account.
You should be able to achieve the same effect by binding
keyboard-coding-system to no-conversion, no?
Yes, but that feels kind of like an abstraction inversion. Still probably good enough. As said, this is only an optimization.