nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] should Verbatim Input do what it says or what it does?


From: David Ramsey
Subject: Re: [Nano-devel] should Verbatim Input do what it says or what it does?
Date: Mon, 27 Jun 2016 15:40:53 -0500

Benno Schulenberg wrote:
> Arbitrary length?  Surely they won't be tens or hundreds of bytes
> long?  But... even if this were so, surely the codes that come after
> the initial escapes (one or two or three) will all be in the printable
> ascii range (0x21 - 0x7e), right?  So verbatim input could just insert
> the initial 0x1b bytes and leave the rest as if they were normal
> characters getting typed?

I think so.  I suppose I'm a bit paranoid, because 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.)

> That will work with the above method.

Good to know.

> Bracketed paste mode...  That would have to work entirely differently;
> it would have to treat reading from the input as if inserting from a
> file. Currently, when you paste something with the mouse, each
> character is made room for, inserted, and the undo item is updated.
> Lots of overhead.  And when undoing the paste, each line is undone
> separately.  The entire paste should be undone as a whole, like an
> inserted file...
>
> Anyway, entirely different matter.  :)

I hadn't thought of the implications with undo; you're right.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]