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. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.2-patched/lib/readline/readline.c 2010-07-25 17:07:40.000000000 -0400 --- lib/readline/readline.c 2012-01-22 16:47:45.000000000 -0500 *************** *** 856,859 **** --- 891,900 ---- #endif + /* 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)