[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] multi-character escape sequences
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] multi-character escape sequences |
Date: |
Mon, 04 Jul 2016 12:42:01 +0200 |
On Mon, Jun 27, 2016, at 22:40, David Ramsey wrote:
> when it comes to
> escape sequences, there's no way to know when they're complete other
> than cessation of input. (For example: If you press Esc O to toggle
> more-space mode, and then type A as part of the current buffer, that's
> one thing. However, if input is stalled and keystrokes accumulate, as
> you put it, Esc O A will be read as a complete sequence, in which case
> it'll be interpreted as the Up arrow key, which users probably won't
> expect.)
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.
https://savannah.gnu.org/bugs/?48395
Benno
--
http://www.fastmail.com - Send your email first class
consider-only-a-few-as-sequence-starters.patch
Description: Text Data
- [Nano-devel] multi-character escape sequences,
Benno Schulenberg <=