5 Patch-ID: readline52-007
7 Bug-Reported-by: Tom Bjorkholm <tom.bjorkholm@ericsson.com>
8 Bug-Reference-ID: <AEA1A32F001C6B4F98614B5B80D7647D01C075E9@esealmw115.eemea.ericsson.se>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-04/msg00004.html
14 An off-by-one error in readline's input buffering caused readline to drop
15 each 511th character of buffered input (e.g., when pasting a large amount
16 of data into a terminal window).
20 *** ../readline-5.2/input.c Wed Aug 16 15:15:16 2006
21 --- input.c Tue Jul 17 09:24:21 2007
25 *key = ibuffer[pop_index++];
27 if (pop_index >= ibuffer_len)
32 *key = ibuffer[pop_index++];
34 if (pop_index >= ibuffer_len)
36 + if (pop_index > ibuffer_len)
43 k = (*rl_getc_function) (rl_instream);
45 if (k == NEWLINE || k == RETURN)
49 k = (*rl_getc_function) (rl_instream);
50 ! if (rl_stuff_char (k) == 0)
51 ! break; /* some problem; no more room */
52 if (k == NEWLINE || k == RETURN)
58 ibuffer[push_index++] = key;
60 if (push_index >= ibuffer_len)
62 + if (push_index > ibuffer_len)