[Top][All Lists]

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

Re: [Bug-readline] Pasting large amounts of text into readline-enabled p

From: Chet Ramey
Subject: Re: [Bug-readline] Pasting large amounts of text into readline-enabled programs truncates parts of the lines of the text being pasted
Date: Mon, 22 Jul 2013 11:56:06 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

On 7/22/13 11:53 AM, Margarita Manterola wrote:
> Hi,
> On Mon, Jul 22, 2013 at 5:42 PM, Chet Ramey <address@hidden> wrote:
>> I spent a bunch of time looking at this and concluded that the problem was
>> the result of changing the terminal modes from cooked to raw and back at
>> every line boundary.
> Who is doing this change?  I would expect it to be the terminal, but
> the example code in
> http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00006.html
> doesn't have a mode change per line.

readline does it.  That's how readline is able to read a character at a

>> The workaround is to turn off line editing (and the terminal mode
>> switching) before pasting a large number of characters into the input
>> buffer.  This has been tested and works.
> Can you elaborate a bit more on this, please?

Sure.  It's application-specific.  In bash, for instance:

set +o emacs +o vi


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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