On 1/22/12 7:35 AM, Roger wrote:
>> On Sat, Jan 21, 2012 at 09:17:32PM -0500, Chet Ramey wrote:
>> I could look at putting in some sort of inter-character timeout, but I
>> don't know yet how well the code structure lends itself to that.
Pretty easily, as it turns out. The attached patch adds a half-second
timeout to the key sequence code. Please let me know whether or not it
works for you.
+ /* Tentative inter-character timeout for potential multi-key
+ sequences? If no input within timeout, abort sequence and
+ act as if we got non-matching input. */
+ if (_rl_input_queued (500000) == 0)
+ return (_rl_subseq_result (-2, map, key, got_subseq));
newkey = _rl_subseq_getchar (key);
if (newkey < 0)