[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] multi-character escape sequences
From: |
David Ramsey |
Subject: |
Re: [Nano-devel] multi-character escape sequences |
Date: |
Tue, 5 Jul 2016 17:47:06 -0500 |
On Mon, Jul 4, 2016 at 2:11 PM, Benno Schulenberg
<address@hidden> wrote:
> I hadn't thought of that. Luckily, though, there are just a few
> characters that, when they follow Esc, will start a multi-character
> escape sequence: O, o, [, and Esc itself. So for all other characters
> after an Escape, nano shouldn't even be trying to interpret it as a
> multicharacter sequence. See attached patch. This fixes bug #48395
> for me.
Looks good to me.
> This misinterpretation could have been prevented by not giving Alt+O
> any function, and by making it unbindable, just like Alt+[.
>
> Luckily, by default Alt+O is bound to something that the user will
> seldom or never use -- they either set morespace in their ./nanorc
> or don't use it at all. I can't see anyone toggling it now and then,
> and if they do, they probably wait to see the result. So the risk of
> that keystroke ever being misinterpreted due to succeeding keystrokes
> is virtually nil. (Famous last words.)
True. Maybe the same could be said for Alt+X for expert mode, as well?
Once the user's learned the keystrokes well enough, they will rarely toggle
it.
> (I now see that typing Alt+[ results in the message "Unbound key".
> It should probably say "Unbindable key" or "Incomplete sequence"
> instead.)
Sounds good.