bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] readline delay in positioning cursor when editing lin


From: Chet Ramey
Subject: Re: [Bug-readline] readline delay in positioning cursor when editing line
Date: Wed, 22 Jan 2014 09:43:43 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 1/21/14 10:01 AM, Gilles Duvert wrote:
> Dear All,
> 
> There has been some discussion on the GDL bug reports
> (https://sourceforge.net/p/gnudatalanguage/bugs/562/) about cursor
> movements when editing a line, I quote:

I can't reproduce this, but I suspect the problem is that the key sequences
are all keypad-based and share a common prefix.  In this case, readline
waits until it reads a disambiguating character, using the setting of the
input timeout as a delay period.  I suspect that the input timeout is set
too high in your readline build.


> A quick comparison of both sources point on a culprit line in input.c. If
> line 430 of input.c from 6.2 is replaced by line 430 of input.c from 6.1
> problem disappears (I do not claim this should be the best way to handle
> this!).
> 
> $ diff input.c input.c.orig
> 430c430
> <         while (rl_event_hook && rl_get_char (&c) == 0)
> ---
>>         while (rl_event_hook)

This code was wrong because it resulted in the event hook being called
far too often: on every event rather than just on timeouts.

Chet

-- 
``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]